Announcements

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">
    <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
  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",
    "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
DerbySupportedYes
FirebirdSupportedYes
H2SupportedYes
HyperSQLSupportedYes
InformixSupportedYes
MySQLSupportedYes
OracleSupportedYes
PostgreSQLSupportedYes
SQL ServerSupportedYes
SQLiteSupportedYes
SybaseSupportedYes
Sybase AnywhereSupportedYes

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