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

Drops an existing check constraint

Available Attributes

NameDescription
catalogNameName of the catalog@ v3.0E.g. 'cat'
constraintNameName of check constraint to dropE.g. 'const_name'
schemaNameName of the schemaE.g. 'public'
tableNameName of the table to drop the check constraint fromE.g. 'person'
<changeSet author="liquibase-docs" id="dropCheckConstraint-example">
    <pro:dropCheckConstraint catalogName="cat"
            constraintName="const_name"
            schemaName="public"
            tableName="person"/>
</changeSet>
changeSet:
  id: dropCheckConstraint-example
  author: liquibase-docs
  changes:
  - dropCheckConstraint:
      catalogName: cat
      constraintName: const_name
      schemaName: public
      tableName: person
{
  "changeSet": {
    "id": "dropCheckConstraint-example",
    "author": "liquibase-docs",
    "changes": [
      {
        "dropCheckConstraint": {
          "catalogName": "cat",
          "constraintName": "const_name",
          "schemaName": "public",
          "tableName": "person"
        }
      }]
    
  }
}

SQL Generated From Above Sample (SQL Server)

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

Database Support

DatabaseNotesAuto Rollback
DB2/LUWSupportedNo
DB2/zSupportedNo
DerbyNot SupportedNo
FirebirdNot SupportedNo
H2Not SupportedNo
HyperSQLNot SupportedNo
INGRESNot SupportedNo
InformixNot SupportedNo
MariaDBNot SupportedNo
MySQLNot SupportedNo
OracleSupportedNo
PostgreSQLSupportedNo
SQL ServerSupportedNo
SQLiteNot SupportedNo
SybaseNot SupportedNo
Sybase AnywhereNot SupportedNo