Liquibase® version 3.8.5 is now available! Get it for free.
2018 XML Announcement
News All Previous Posts >>

Subscribe for email updates

- and/or -

Change: ‘disableCheckConstraint’

Disable Check Constraint

Available Attributes

NameDescriptionRequired ForSupportsSince
catalogNameName of the catalogall
constraintNameallall
schemaNameName of the schemaall
tableNameName of the tableallall
<changeSet author="liquibase-docs" id="disableCheckConstraint-example">
    <pro:disableCheckConstraint catalogName="cat"
            constraintName="const_name"
            schemaName="public"
            tableName="person"/>
</changeSet>
changeSet:
  id: disableCheckConstraint-example
  author: liquibase-docs
  changes:
  - disableCheckConstraint:
      catalogName: cat
      constraintName: const_name
      schemaName: public
      tableName: person
{
  "changeSet": {
    "id": "disableCheckConstraint-example",
    "author": "liquibase-docs",
    "changes": [
      {
        "disableCheckConstraint": {
          "catalogName": "cat",
          "constraintName": "const_name",
          "schemaName": "public",
          "tableName": "person"
        }
      }]
    
  }
}

SQL Generated From Above Sample (SQL Server)

ALTER TABLE cat.[public].person NOCHECK CONSTRAINT const_name;

Database Support

DatabaseNotesAuto Rollback
DB2/LUWSupportedYes
DB2/zSupportedYes
DerbyNot SupportedYes
FirebirdNot SupportedYes
H2Not SupportedYes
HyperSQLNot SupportedYes
INGRESNot SupportedYes
InformixNot SupportedYes
MariaDBNot SupportedYes
MySQLNot SupportedYes
OracleSupportedYes
PostgreSQLNot SupportedYes
SQL ServerSupportedYes
SQLiteNot SupportedYes
SybaseNot SupportedYes
Sybase AnywhereNot SupportedYes