Change: ‘dropNotNullConstraint’

Makes a column nullable

Available Attributes

NameDescriptionRequired ForSupportsSince
catalogNameName of the catalogall3.0
columnDataTypeCurrent data type of the columninformix, mssql, h2, mysqlall
columnNameName of the column to drop the constraint fromallall
schemaNameName of the schemaall
tableNameName of the table containing that the column to drop the constraint fromallall
<changeSet author="liquibase-docs" id="dropNotNullConstraint-example">
    <dropNotNullConstraint catalogName="cat"
            columnDataType="int"
            columnName="id"
            schemaName="public"
            tableName="person"/>
</changeSet>
changeSet:
  id: dropNotNullConstraint-example
  author: liquibase-docs
  changes:
  - dropNotNullConstraint:
      catalogName: cat
      columnDataType: int
      columnName: id
      schemaName: public
      tableName: person
{
  "changeSet": {
    "id": "dropNotNullConstraint-example",
    "author": "liquibase-docs",
    "changes": [
      {
        "dropNotNullConstraint": {
          "catalogName": "cat",
          "columnDataType": "int",
          "columnName": "id",
          "schemaName": "public",
          "tableName": "person"
        }
      }]
    
  }
}

SQL Generated From Above Sample (MySQL)

ALTER TABLE cat.person MODIFY id INT NULL;

Database Support

DatabaseNotesAuto Rollback
DB2SupportedYes
DerbySupportedYes
FirebirdNot SupportedYes
H2SupportedYes
HyperSQLSupportedYes
InformixSupportedYes
MySQLSupportedYes
OracleSupportedYes
PostgreSQLSupportedYes
SQL ServerSupportedYes
SQLiteNot SupportedYes
SybaseSupportedYes
Sybase AnywhereSupportedYes

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