Change: ‘modifyDataType’

Modify data type

Available Attributes

NameDescriptionRequired ForSupportsSince
catalogNameName of the catalogall3.0
columnNameName of the columnallall
newDataTypeallall
schemaNameName of the schemaall
tableNameName of the tableallall
<changeSet author="liquibase-docs" id="modifyDataType-example">
    <modifyDataType catalogName="cat"
            columnName="id"
            newDataType="int"
            schemaName="public"
            tableName="person"/>
</changeSet>
changeSet:
  id: modifyDataType-example
  author: liquibase-docs
  changes:
  - modifyDataType:
      catalogName: cat
      columnName: id
      newDataType: int
      schemaName: public
      tableName: person
{
  "changeSet": {
    "id": "modifyDataType-example",
    "author": "liquibase-docs",
    "changes": [
      {
        "modifyDataType": {
          "catalogName": "cat",
          "columnName": "id",
          "newDataType": "int",
          "schemaName": "public",
          "tableName": "person"
        }
      }]
    
  }
}

SQL Generated From Above Sample (MySQL)

ALTER TABLE cat.person MODIFY id INT;

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