modifyDataType
Allows you to modify data types.
Available attributes
Name | Description | Required for | Supports | Since |
---|---|---|---|---|
catalogName
|
Name of the catalog | all | 3.0 | |
columnName
|
Name of the column | all | all | |
newDataType
|
all | all | ||
schemaName
|
Name of the schema | all | ||
tableName
|
Name of the table | all | all |

<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"
}
}]
}
}

ALTER TABLE cat.person MODIFY id INT;
Database support
Database | Notes | Auto rollback |
---|---|---|
DB2/LUW | Supported | No |
DB2/z | Not Supported | No |
Derby | Supported | No |
Firebird | Supported | No |
H2 | Supported | No |
HyperSQL | Supported | No |
INGRES | Supported | No |
Informix | Supported | No |
MariaDB | Supported | No |
MySQL | Supported | No |
Oracle | Supported | No |
PostgreSQL | Supported | No |
Snowflake | Supported | No |
SQL Server | Supported | No |
SQLite | Not Supported | No |
Sybase | Supported | No |
Sybase Anywhere | Supported | No |