Change: ‘dropDefaultValue’

Removes the database default value for a column

Available Attributes

NameDescriptionRequired ForSupportsSince
catalogNameName of the catalogall3.0
columnDataTypeinformixall
columnNameName of column to drop the default value fromallall
schemaNameName of the schemaall
tableNameName of the table to containing the columnallall
<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
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