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

Drops all foreign key constraints for a table

Available Attributes

NameDescription
baseTableCatalogNameCatalog name of the table containing columns constrained by foreign keys@ v3.0E.g. 'cat'
baseTableNameName of the table containing columns constrained by foreign keysE.g. 'person'
baseTableSchemaNameSchema name of the table containing columns constrained by foreign keysE.g. 'public'
<changeSet author="liquibase-docs" id="dropAllForeignKeyConstraints-example">
    <dropAllForeignKeyConstraints baseTableCatalogName="cat"
            baseTableName="person"
            baseTableSchemaName="public"/>
</changeSet>
changeSet:
  id: dropAllForeignKeyConstraints-example
  author: liquibase-docs
  changes:
  - dropAllForeignKeyConstraints:
      baseTableCatalogName: cat
      baseTableName: person
      baseTableSchemaName: public
{
  "changeSet": {
    "id": "dropAllForeignKeyConstraints-example",
    "author": "liquibase-docs",
    "changes": [
      {
        "dropAllForeignKeyConstraints": {
          "baseTableCatalogName": "cat",
          "baseTableName": "person",
          "baseTableSchemaName": "public"
        }
      }]
    
  }
}

Database Support

DatabaseNotesAuto Rollback
DB2/LUWSupportedNo
DB2/zSupportedNo
DerbySupportedNo
FirebirdSupportedNo
H2SupportedNo
HyperSQLSupportedNo
INGRESSupportedNo
InformixSupportedNo
MariaDBSupportedNo
MySQLSupportedNo
OracleSupportedNo
PostgreSQLSupportedNo
SQL ServerSupportedNo
SQLiteSupportedNo
SybaseSupportedNo
Sybase AnywhereSupportedNo