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: ‘enableCheckConstraint’

Enable Check Constraint

Available Attributes

NameDescription
catalogNameName of the catalogE.g. 'cat'
constraintNameE.g. 'const_name'
schemaNameName of the schemaE.g. 'public'
tableNameName of the tableE.g. 'person'
<changeSet author="liquibase-docs" id="enableCheckConstraint-example">
    <pro:enableCheckConstraint catalogName="cat"
            constraintName="const_name"
            schemaName="public"
            tableName="person"/>
</changeSet>
changeSet:
  id: enableCheckConstraint-example
  author: liquibase-docs
  changes:
  - enableCheckConstraint:
      catalogName: cat
      constraintName: const_name
      schemaName: public
      tableName: person
{
  "changeSet": {
    "id": "enableCheckConstraint-example",
    "author": "liquibase-docs",
    "changes": [
      {
        "enableCheckConstraint": {
          "catalogName": "cat",
          "constraintName": "const_name",
          "schemaName": "public",
          "tableName": "person"
        }
      }]
    
  }
}

SQL Generated From Above Sample (SQL Server)

ALTER TABLE cat.[public].person WITH CHECK CHECK 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