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

XML example

<changeSet  author="liquibase-docs"  id="modifyDataType-example">  
    <modifyDataType  catalogName="cat"  
            columnName="id"  
            newDataType="int"  
            schemaName="public"  
            tableName="person"/>  
</changeSet>

YAML example

changeSet:  
  id:  modifyDataType-example  
  author:  liquibase-docs  
  changes:  
  -  modifyDataType:  
      catalogName:  cat  
      columnName:  id  
      newDataType:  int  
      schemaName:  public  
      tableName:  person

JSON example

{  "changeSet":  {  "id":  "modifyDataType-example",  "author":  "liquibase-docs",  "changes":  [  {  "modifyDataType":  {  "catalogName":  "cat",  "columnName":  "id",  "newDataType":  "int",  "schemaName":  "public",  "tableName":  "person"  }  }]  }  }

SQL example

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
SQL Server Supported No
SQLite Not Supported No
Sybase Supported No
Sybase Anywhere Supported No