Liquibase® version 3.8.1 is now available! Get it for free.
2018 XML Announcement
News Liquibase 3.8.1 Released
06 Nov 2019

- and/or -

All Previous Posts >>

Change: ‘createTable’

Create Table

Available Attributes

NameDescriptionRequired ForSupportsSince
catalogNameName of the catalogall3.0
remarksall
schemaNameName of the schemaall
tableNameName of the tableallall
tablespaceall

Nested Properties

NameDescriptionRequired ForSupportsMultiple AllowedSince
columns

See the column tag documentation for more information
allallyes
<changeSet author="liquibase-docs"
        id="createTable-example"
        objectQuotingStrategy="LEGACY">
    <createTable catalogName="cat"
            remarks="A String"
            schemaName="public"
            tableName="person"
            tablespace="A String">
        <column name="address" type="varchar(255)"/>
    </createTable>
</changeSet>
changeSet:
  id: createTable-example
  author: liquibase-docs
  objectQuotingStrategy: LEGACY
  changes:
  - createTable:
      catalogName: cat
      columns:
      - column:
          name: address
          type: varchar(255)
      remarks: A String
      schemaName: public
      tableName: person
      tablespace: A String
{
  "changeSet": {
    "id": "createTable-example",
    "author": "liquibase-docs",
    "objectQuotingStrategy": "LEGACY",
    "changes": [
      {
        "createTable": {
          "catalogName": "cat",
          "columns": [
            {
              "column": {
                "name": "address",
                "type": "varchar(255)"
              }
            }]
          ,
          "remarks": "A String",
          "schemaName": "public",
          "tableName": "person",
          "tablespace": "A String"
        }
      }]
    
  }
}

SQL Generated From Above Sample (MySQL)

CREATE TABLE cat.person (address VARCHAR(255) NULL) COMMENT='A String';

ALTER TABLE cat.person COMMENT = 'A String';

Database Support

DatabaseNotesAuto Rollback
DB2SupportedYes
DB2SupportedYes
DerbySupportedYes
FirebirdSupportedYes
H2SupportedYes
HyperSQLSupportedYes
INGRESSupportedYes
InformixSupportedYes
MariaDBSupportedYes
MySQLSupportedYes
OracleSupportedYes
PostgreSQLSupportedYes
SQL ServerSupportedYes
SQLiteSupportedYes
SybaseSupportedYes
Sybase AnywhereSupportedYes