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

Drops an existing index

Available Attributes

NameDescriptionRequired ForSupportsSince
catalogNameName of the catalogall3.0
indexNameName of the index to dropallall
schemaNameName of the schemaall
tableNameName fo the indexed table.mariadb, sybase, asany, mysql, mssqlall
<changeSet author="liquibase-docs"
        id="dropIndex-example"
        objectQuotingStrategy="LEGACY">
    <dropIndex catalogName="cat"
            indexName="idx_address"
            schemaName="public"
            tableName="person"/>
</changeSet>
changeSet:
  id: dropIndex-example
  author: liquibase-docs
  objectQuotingStrategy: LEGACY
  changes:
  - dropIndex:
      catalogName: cat
      indexName: idx_address
      schemaName: public
      tableName: person
{
  "changeSet": {
    "id": "dropIndex-example",
    "author": "liquibase-docs",
    "objectQuotingStrategy": "LEGACY",
    "changes": [
      {
        "dropIndex": {
          "catalogName": "cat",
          "indexName": "idx_address",
          "schemaName": "public",
          "tableName": "person"
        }
      }]
    
  }
}

SQL Generated From Above Sample (MySQL)

DROP INDEX idx_address ON cat.person;

Database Support

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