Liquibase® version 3.8.2 is now available! Get it for free.
2018 XML Announcement
News 5 Ways to Fix a Bad Database Change in Liquibase
04 Dec 2019

- and/or -

All Previous Posts >>

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
DB2SupportedYes
DB2SupportedYes
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