Change: ‘dropUniqueConstraint’

Drops an existing unique constraint

Available Attributes

NameDescriptionRequired ForSupportsSince
catalogNameName of the catalogall3.0
constraintNameName of unique constraint to dropallall
schemaNameName of the schemaall
tableNameName of the table to drop the unique constraint fromallall
uniqueColumnsall
<changeSet author="liquibase-docs" id="dropUniqueConstraint-example">
    <dropUniqueConstraint catalogName="cat"
            constraintName="const_name"
            schemaName="public"
            tableName="person"
            uniqueColumns="A String"/>
</changeSet>
changeSet:
  id: dropUniqueConstraint-example
  author: liquibase-docs
  changes:
  - dropUniqueConstraint:
      catalogName: cat
      constraintName: const_name
      schemaName: public
      tableName: person
      uniqueColumns: A String
{
  "changeSet": {
    "id": "dropUniqueConstraint-example",
    "author": "liquibase-docs",
    "changes": [
      {
        "dropUniqueConstraint": {
          "catalogName": "cat",
          "constraintName": "const_name",
          "schemaName": "public",
          "tableName": "person",
          "uniqueColumns": "A String"
        }
      }]
    
  }
}

SQL Generated From Above Sample (MySQL)

ALTER TABLE cat.person DROP KEY const_name;

Database Support

DatabaseNotesAuto Rollback
DB2SupportedNo
DerbySupportedNo
FirebirdSupportedNo
H2SupportedNo
HyperSQLSupportedNo
InformixSupportedNo
MySQLSupportedNo
OracleSupportedNo
PostgreSQLSupportedNo
SQL ServerSupportedNo
SQLiteNot SupportedNo
SybaseSupportedNo
Sybase AnywhereSupportedNo

Missing, incomplete or wrong information? Please send a pull request