enableCheckConstraint

Enables a check constraint.

Available attributes

Name Description Required for Supports Since
catalogName Name of the catalog all
constraintName all all
schemaName Name of the schema all
tableName Name of the table all all

XML example

<changeSet  author="liquibase-docs"  id="enableCheckConstraint-example">  
    <pro:enableCheckConstraint  catalogName="cat"  
            constraintName="const_name"  
            schemaName="public"  
            tableName="person"/>  
</changeSet>

YAML example

changeSet:  
  id:  enableCheckConstraint-example  
  author:  liquibase-docs  
  changes:  
  -  enableCheckConstraint:  
      catalogName:  cat  
      constraintName:  const_name  
      schemaName:  public  
      tableName:  person

JSON example

{  "changeSet":  {  "id":  "enableCheckConstraint-example",  "author":  "liquibase-docs",  "changes":  [  {  "enableCheckConstraint":  {  "catalogName":  "cat",  "constraintName":  "const_name",  "schemaName":  "public",  "tableName":  "person"  }  }]  }  }

SQL example

ALTER  TABLE  cat.[public].person  WITH  CHECK  CHECK  CONSTRAINT  const_name;

Database support

Database Notes Auto rollback
DB2/LUW Supported Yes
DB2/z Supported Yes
Derby Not Supported Yes
Firebird Not Supported Yes
H2 Not Supported Yes
HyperSQL Not Supported Yes
INGRES Not Supported Yes
Informix Not Supported Yes
MariaDB Not Supported Yes
MySQL Not Supported Yes
Oracle Supported Yes
PostgreSQL Not Supported Yes
SQL Server Supported Yes
SQLite Not Supported Yes
Sybase Not Supported Yes
Sybase Anywhere Not Supported Yes