Liquibase® version 3.8.2 is now available! Get it for free.
2018 XML Announcement
News 5 Ways to Fix a Bad Database Change in Liquibase
04 Dec 2019

- and/or -

All Previous Posts >>

Change: ‘dropAllForeignKeyConstraints’

Drops all foreign key constraints for a table

Available Attributes

NameDescriptionRequired ForSupportsSince
baseTableCatalogNameName of the table containing columns constrained by foreign keysall3.0
baseTableNameallall
baseTableSchemaNameall
<changeSet author="liquibase-docs"
        id="dropAllForeignKeyConstraints-example"
        objectQuotingStrategy="LEGACY">
    <dropAllForeignKeyConstraints baseTableCatalogName="cat"
            baseTableName="person"
            baseTableSchemaName="public"/>
</changeSet>
changeSet:
  id: dropAllForeignKeyConstraints-example
  author: liquibase-docs
  objectQuotingStrategy: LEGACY
  changes:
  - dropAllForeignKeyConstraints:
      baseTableCatalogName: cat
      baseTableName: person
      baseTableSchemaName: public
{
  "changeSet": {
    "id": "dropAllForeignKeyConstraints-example",
    "author": "liquibase-docs",
    "objectQuotingStrategy": "LEGACY",
    "changes": [
      {
        "dropAllForeignKeyConstraints": {
          "baseTableCatalogName": "cat",
          "baseTableName": "person",
          "baseTableSchemaName": "public"
        }
      }]
    
  }
}

Database Support

DatabaseNotesAuto Rollback
DB2SupportedNo
DB2SupportedNo
DerbySupportedNo
FirebirdSupportedNo
H2SupportedNo
HyperSQLSupportedNo
INGRESSupportedNo
InformixSupportedNo
MariaDBSupportedNo
MySQLSupportedNo
OracleSupportedNo
PostgreSQLSupportedNo
SQL ServerSupportedNo
SQLiteSupportedNo
SybaseSupportedNo
Sybase AnywhereSupportedNo