Change: ‘enableCheckConstraint’

Enable Check Constraint

Available Attributes

NameDescriptionRequired ForSupportsSince
catalogNameName of the catalogall
constraintNameallall
schemaNameName of the schemaall
tableNameName of the tableallall
<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