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

Removes the database default value for a column

Available Attributes

NameDescription
catalogNameName of the catalog@ v3.0E.g. 'cat'
columnDataTypeE.g. 'int'Required for: informix
columnNameName of column to drop the default value fromE.g. 'id'
schemaNameName of the schemaE.g. 'public'
tableNameName of the table to containing the columnE.g. 'person'
<changeSet author="liquibase-docs" id="dropDefaultValue-example">
    <dropDefaultValue catalogName="cat"
            columnDataType="int"
            columnName="id"
            schemaName="public"
            tableName="person"/>
</changeSet>
changeSet:
  id: dropDefaultValue-example
  author: liquibase-docs
  changes:
  - dropDefaultValue:
      catalogName: cat
      columnDataType: int
      columnName: id
      schemaName: public
      tableName: person
{
  "changeSet": {
    "id": "dropDefaultValue-example",
    "author": "liquibase-docs",
    "changes": [
      {
        "dropDefaultValue": {
          "catalogName": "cat",
          "columnDataType": "int",
          "columnName": "id",
          "schemaName": "public",
          "tableName": "person"
        }
      }]
    
  }
}

SQL Generated From Above Sample (MySQL)

ALTER TABLE cat.person ALTER id DROP DEFAULT;

Database Support

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