Liquibase® version 3.8.1 is now available! Get it for free.
2018 XML Announcement
News Liquibase 3.8.1 Released
06 Nov 2019

- and/or -

All Previous Posts >>

Change: ‘dropColumn’

Drop existing column(s)

Available Attributes

NameDescriptionRequired ForSupportsSince
catalogNameName of the catalogall3.0
columnNameName of the column to dropall
schemaNameName of the schemaall
tableNameName of the table containing the column to dropallall

Nested Properties

NameDescriptionRequired ForSupportsMultiple AllowedSince
columnsColumns to be dropped.

See the column tag documentation for more information
allyes
<changeSet author="liquibase-docs"
        id="dropColumn-example"
        objectQuotingStrategy="LEGACY">
    <dropColumn catalogName="cat"
            columnName="id"
            schemaName="public"
            tableName="person">
        <column name="address" type="varchar(255)"/>
    </dropColumn>
</changeSet>
changeSet:
  id: dropColumn-example
  author: liquibase-docs
  objectQuotingStrategy: LEGACY
  changes:
  - dropColumn:
      catalogName: cat
      columnName: id
      columns:
      - column:
          name: address
          type: varchar(255)
      schemaName: public
      tableName: person
{
  "changeSet": {
    "id": "dropColumn-example",
    "author": "liquibase-docs",
    "objectQuotingStrategy": "LEGACY",
    "changes": [
      {
        "dropColumn": {
          "catalogName": "cat",
          "columnName": "id",
          "columns": [
            {
              "column": {
                "name": "address",
                "type": "varchar(255)"
              }
            }]
          ,
          "schemaName": "public",
          "tableName": "person"
        }
      }]
    
  }
}

SQL Generated From Above Sample (MySQL)

ALTER TABLE cat.person DROP COLUMN address;

Database Support

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