Schema URL

Type: object

Properties

databaseChangeLog object[] required

The root of all Liquibase changes is the changelog file. Liquibase uses a changelog to sequentially list all changes made to your database. Think of it as a ledger. It is a file that contains a record of all your database changes (changesets). Liquibase uses this changelog record to audit your database and execute any changes that are not yet applied to your database.

Default:
[]

Definitions

catalogName string

The name of the catalog

schemaName string

The name of the schema

remarks string

The comments stored for the table/view/column

tableName string

The name of the table

where string

Allows to define the 'where' condition(s) string

dbms string

Specifies logical expression of database type(s) on which the change must be applied. Valid database type names are listed on the supported databases page. It can be a comma-separated list of multiple databases or you can also specify that a change is not applicable to a particular database type by prefixing with !. The keywords all and none are also available.

column object
name string required

The name of the column.

Default: ""
computed boolean

The attribute which is used if the value in name isn't actually a column name but a function. Since 3.3.0

Default: false
descending boolean

The boolean attribute which allows you to specify that a column should be used in a descending order in the index if it is used in a createIndex command. Default value is false (in an ascending order) Since 3.4

Default: false
type string

The column data type.

Default: ""
value string

The value for which to set the column. The value will be surrounded by quote marks and nested quote marks will be escaped.

Default: ""
valueNumeric number

The numeric value to set the column to. The value will not be escaped and will not be nested in quote marks.

Default: ""
valueBoolean boolean

The boolean value to set the column to. The actual value string inserted will depend on the database implementation.

Default: ""
valueDate string

The date and time value to set the column to. The value is specified in one of the following forms: YYYY-MM-DD, hh:mm:ss, or YYYY-MM-DDThh:mm:ss.

Default: ""
valueComputed string

The value that is returned from a function or procedure call. This attribute will contain the function to call.

Default: ""
valueSequenceCurrent string

The name of the sequence in which the current value is used.

Default: ""
valueSequenceNext string

The name of the sequence in which the next value is used.

Default: ""
valueBlobFile string

The path to a file, whose contents will be written as a BLOB (i.e. chunk of binary data).

The path to the changelog file location must be either absolute or relative. An example of an absolute path is: /usr/local/somefile.dat on Unix or c:\Directory\somefile.dat on Windows.

Default: ""
valueClobFile string

The path to a file, whose contents will be written as a CLOB (i.e. chunk of character data). The path to the changelog file location must be either absolute or relative. An example of an absolute path is: /usr/local/somefile.dat on Unix or c:\Directory\somefile.dat on Windows.

Default: ""
defaultValue string

The default value for column.

Default: ""
defaultValueNumeric number

The default numeric value for column.

Default: ""
defaultValueDate string

The default date and time value for column. The value is specified in one of the following forms: YYYY-MM-DD, hh:mm:ss, or YYYY-MM-DDThh:mm:ss.

Default: ""
defaultValueBoolean boolean

The default boolean value for column.

Default: false
defaultValueComputed string

The default value that is returned from a function or procedure call. This attribute will contain the function to call.

Default: ""
defaultValueSequenceCurrent string
Default: ""
defaultValueSequenceNext string
Default: ""
defaultValueConstraintName string
Default: ""
autoIncrement boolean

The auto-increment column. Ignored on databases that do not support the autoincrement/identity functionality.

Default: false
startWith integer

The value auto-increment start. Ignored on databases that do not support autoincrement/identity functionality.

Default: 0
incrementBy integer

The value of each step by auto-increment. Ignored on databases that do not support autoincrement/identity functionality.

Default: 0
generationType string
Default: ""
defaultOnNull boolean
Default: false
remarks string

A short description of the column (column comment).

Default: ""
encoding string

The name of the encoding (specified in java.nio.Charset javadoc, e.g. "UTF-8") of the CLOB file (specified in valueClobFile) contents.

Default: ""
beforeColumn string

The attribute that allows you to control where in the table column order the new column goes if it is used in an addColumn command. Only one of beforeColumn, afterColumn, or position is allowed. Since 3.1

Default: ""
afterColumn string

The attribute that allows you to control where in the table column order the new column goes if it is used in an addColumn command. Only one of beforeColumn, afterColumn, or position is allowed. Since 3.1

Default: ""
position number

The attribute that allows you to control where in the table column order the new column goes if it is used in an addColumn command. Only one of beforeColumn, afterColumn, or position is allowed. Uses one based index. Since 3.1

Default: ""
header string

Name of the column in the CSV file from which the value for the column will be taken if its different from the column name. Ignored if index is also defined.

Default: ""
index integer

Index of the column in the CSV file from which the value for the column will be taken.

Default: ""
constraints object

Constraint definitions

Default:
{}
21 nested properties
nullable boolean

The attribute that defines whether the column is nullable.

Default: false
notNullConstraintName string

The not null constraint name.

Default: ""
primaryKey boolean

The attribute that defines whether the column is a primary key.

Default: false
primaryKeyName string

The primary key name Since 1.6.

Default: ""
primaryKeyTablespace string

The tablespace to use for the defined primary key.

Default: ""
unique boolean

The attribute that defines whether a unique clause should be applied.

Default: false
uniqueConstraintName string

The unique constraint name.

Default: ""
references string

The foreign key definition.

Default: ""
referencedTableCatalogName string

The name of the catalog.

Default: ""
referencedTableSchemaName string

The name of the schema.

Default: ""
referencedTableName string

The name of the table.

Default: ""
referencedColumnNames string

The name of the column.

Default: ""
foreignKeyName string

The foreign key name.

Default: ""
deleteCascade boolean

The attribute that sets delete cascade.

Default: false
deferrable boolean

The attribute that defines whether constraints are deferrable.

Default: false
initiallyDeferred boolean

The attribute that defines whether constraints are initially deferred.

Default: false
checkConstraint string

The attribute that defines whether to validate the defined check constraint.

Default: ""
validateNullable boolean

The attribute that defines whether to validate the defined not null constraint.

Default: false
validateUnique boolean

The attribute that defines whether to validate the defined unique constraint.

Default: false
validatePrimaryKey boolean

The attribute that defines whether to validate the defined primary key constraint.

Default: false
validateForeignKey boolean

The attribute that defines whether to validate the defined foreign key constraint.

Default: false
columns object[]

The column constraint and foreign key information. Setting the defaultValue attribute will specify a default value for the column. Setting the value attribute will set all rows existing to the specified value without modifying the column default. See Information about the tag section for more information.

preConditions object[]

Preconditions are changelog or changeset tags which control the execution of an update based on the state of the database.

createTable object

You can typically use the createTable Change Type when you want to create a table in your changelog file and then deploy it to your database. It can include columns and another values listed in this documentation.

tableName string required

The name of the table

Default: ""
columns object[] required

The column constraint and foreign key information. Setting the defaultValue attribute will specify a default value for the column. Setting the value attribute will set all rows existing to the specified value without modifying the column default. See Information about the tag section for more information.

Default:
[]
minItems=1
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
tablespace string

The name of the tablespace in which the table is created

Default: ""
remarks string

The comments stored for the table/view/column

Default: ""
createView object

Creates a new database view.

catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
viewName string

Name of the view to create

Default: ""
remarks string

The comments stored for the table/view/column

Default: ""
replaceIfExists boolean

Use 'create or replace' syntax

Default: false
fullDefinition boolean

Set to true if selectQuery is the entire view definition. False if the CREATE VIEW header should be added.

Default: false
path string

Path to file containing view definition

Default: ""
encoding string

Encoding used in the file defined in the path attribute

Default: ""
relativeToChangelogFile boolean

Whether the file path relative to the root changelog file rather than to the classpath.

Default: false
selectQuery string

SQL for generating the view

Default: ""
sql object

It is useful for complex changes that aren't supported through Liquibase's automated Change Types and to work around bugs and limitations of Liquibase. The SQL contained in the Change Type can be multi-line.

sql string required

Specifies the SQL to execute

Default: ""
stripComments boolean

Set to true to remove any comments in the SQL before executing, otherwise false.

Default: false
splitStatements boolean

Set to false to not have Liquibase split statements on ;'s and GO's. Defaults to true if not set

Default: false
endDelimiter string

Indicates the end of the SQL statement and prevents incomplete SQL statements from being processed when the SQL files contain statements referencing a ; which Liquibase treats as the default end delimiter. You can use the endDelimiter when the changeset contains SQL to create a stored procedure or function that contains the default ; end delimiter to separate the statements inside the procedure. For more information, see The endDelimiter SQL attribute.

Default: ""
dbms string

Specifies logical expression of database type(s) on which the change must be applied. Valid database type names are listed on the supported databases page. It can be a comma-separated list of multiple databases or you can also specify that a change is not applicable to a particular database type by prefixing with !. The keywords all and none are also available.

Default: ""
comment string
Default: ""
update object

You can typically use the update Change Type when you want to update a table in your changelog file and then deploy this update to your database. It can include columns and another values listed in this documentation.

tableName string required

The name of the table

Default: ""
columns object[] required

The column constraint and foreign key information. Setting the defaultValue attribute will specify a default value for the column. Setting the value attribute will set all rows existing to the specified value without modifying the column default. See Information about the tag section for more information.

Default:
[]
minItems=1
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
where string

Allows to define the 'where' condition(s) string

Default: ""
whereParams object[]
Default:
[]
delete object

Deletes data from an existing table.

tableName string required

The name of the table

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
where string

Allows to define the 'where' condition(s) string

Default: ""
whereParams object[]
Default:
[]
whereParams object[]
tagDatabase object

The tagDatabase Change Type applies a tag to the database for future update or rollback.

tag string required

The tag to apply

Default: ""
dropTable object

Drops an existing table from your database.

tableName string required

The name of the table

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
cascadeConstraints boolean

Add the CASCADE CONSTRAINTS to the statement

Default: false
renameView object
oldViewName string required

Name of the view to rename

Default: ""
newViewName string required

Name to rename the view to

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
dropView object

Drops an existing view.

viewName string required

Name of the view to drop

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
empty object

empty

insert object

You can typically use the insert Change Type when you want to add and deploy the specific data or values to the existing table in your database. It can include columns and another attributes listed in this documentation.

tableName string required

The name of the table

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
dbms string

Specifies logical expression of database type(s) on which the change must be applied. Valid database type names are listed on the supported databases page. It can be a comma-separated list of multiple databases or you can also specify that a change is not applicable to a particular database type by prefixing with !. The keywords all and none are also available.

Default: ""
columns object[]

The column constraint and foreign key information. Setting the defaultValue attribute will specify a default value for the column. Setting the value attribute will set all rows existing to the specified value without modifying the column default. See Information about the tag section for more information.

Default:
[]
minItems=1
addColumn object

You can typically use the addColumn Change Type when you want to add a new column and deploy it to the table in your database.

tableName string required

The name of the table

Default: ""
columns object[] required

The column constraint and foreign key information. Setting the defaultValue attribute will specify a default value for the column. Setting the value attribute will set all rows existing to the specified value without modifying the column default. See Information about the tag section for more information.

Default:
[]
minItems=1
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
createProcedure object

The createProcedure Change Type defines the definition for a stored procedure. This Change Type is better to use for creating procedures than the raw SQL command because it will not attempt to strip comments or break up lines.

Often times it is best to use the CREATE OR REPLACE syntax along with setting runOnChange='true' on the enclosing changeset tag. That way if you need to make a change to your procedure, you can change your existing code rather than creating a new REPLACE PROCEDURE call. The advantage to this approach is that it keeps your changelog smaller and allows you to more easily see what has changed in your procedure code through your source control system's diff command.

procedureText string required

The SQL creating the procedure. You need to define either this attribute or the path attribute. The procedureText attribute is not supported in the XML format; however, you can specify the procedure SQL within </ tags. See the XML example.

Default: ""
path string required

The file containing the procedure text. Either this attribute or a nested procedure text is required.

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
procedureName string

The name of the procedure. It is required if replaceIfExists= true

Default: ""
encoding string

The encoding used in the file defined in the path attribute

Default: ""
relativeToChangelogFile boolean

Defines whether the file path is relative to the root changelog file rather than to the classpath.

Default: false
dbms string

Specifies logical expression of database type(s) on which the change must be applied. Valid database type names are listed on the supported databases page. It can be a comma-separated list of multiple databases or you can also specify that a change is not applicable to a particular database type by prefixing with !. The keywords all and none are also available.

Default: ""
replaceIfExists boolean

If the stored procedure defined by procedureName already exits, alter it instead of creating it.

Default: ""
comments string

The comments you can specify in the changeset.

Default: ""
dropProcedure object

Drops an existing procedure

procedureName string required

Name of the stored procedure to drop

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
sqlFile object

The Change Type is useful for complex changes that are not supported through Liquibase automated Change Types such as stored procedures. The SQL contained in the Change Type can be multi-line.

path string required

Specifies the file path of the SQL file to load.

Default: ""
stripComments boolean

Set to true to remove any comments in the SQL before executing, otherwise false.

Default: false
splitStatements boolean

Set to false to not have Liquibase split statements on ;'s and GO's. Defaults to true if not set.

Default: false
encoding string

Specifies encoding used in the file defined in the path attribute.

Default: ""
endDelimiter string

Indicates the end of the SQL statement and prevents incomplete SQL statements from being processed when the SQL files contain statements referencing a ; which Liquibase treats as the default end delimiter. You can use the endDelimiter when the changeset contains SQL to create a stored procedure or function that contains the default ; end delimiter to separate the statements inside the procedure. For more information, see The endDelimiter SQL attribute.

Default: ""
relativeToChangelogFile boolean

Indicates whether the file path is relative to the root changelog file rather than to the classpath.

Default: false
dbms string

Specifies logical expression of database type(s) on which the change must be applied. Valid database type names are listed on the supported databases page. It can be a comma-separated list of multiple databases or you can also specify that a change is not applicable to a particular database type by prefixing with !. The keywords all and none are also available.

Default: ""
comment string
Default: ""
stop object

Stops Liquibase execution with a message. Mainly useful for debugging and stepping through a changelog

message string

Message to output when execution stops

Default: ""
renameTable object

Renames an existing table.

oldTableName string required

Name of the table to rename

Default: ""
newTableName string required

New name for the table

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
renameColumn object

Renames an existing column.

tableName string required

The name of the table

Default: ""
oldColumnName string required

Name of the existing column to rename

Default: ""
newColumnName string required

Name to rename the column to

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
columnDataType string

Data type of the column

Default: ""
remarks string

Remarks of the column

Default: ""
dropColumn object

Drops an existing column(s).

To drop a single column, use the simple form of this element where the tableName and columnName are specified as attributes. To drop several columns, specify the tableName as an attribute, and then specify a set of nested tags. If nested tags are present, the columnName attribute will be ignored.

tableName string required

The name of the table

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
columnName string

Name of the column to drop, if dropping a single column. Ignored if nested 'column's are defined

Default: ""
columns object[]

The column constraint and foreign key information. Setting the defaultValue attribute will specify a default value for the column. Setting the value attribute will set all rows existing to the specified value without modifying the column default. See Information about the tag section for more information.

Default:
[]
minItems=1
mergeColumns object

The mergeColumns Change Type concatenates the values in two columns and joins them with a string. The Change Type stores the resulting value in a new column. You can typically use the mergeColumns Change Type when you want to combine the values from two columns into one.

tableName string required

The name of the table

Default: ""
column1Name string required

The name of the column containing the first half of the data

Default: ""
column2Name string required

The name of the column containing the second half of the data

Default: ""
finalColumnName string required

The name of the column to create

Default: ""
finalColumnType string required

The data type of the column to create

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
joinString string

The string to place between the values from column1 and column2 (may be empty)

Default: ""
modifyDataType object

Allows you to modify data types.

tableName string required

The name of the table

Default: ""
columnName string required

Name of the column

Default: ""
newDataType string required
Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
createSequence object

Creates a new database sequence.

sequenceName string required

Name of the sequence to create

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
startValue integer

The first sequence number to be generated.

Default: ""
incrementBy integer

Interval between sequence numbers

Default: ""
maxValue integer

The maximum value of the sequence

Default: ""
minValue integer

The minimum value of the sequence

Default: ""
ordered boolean

Does the sequence need to be guaranteed to be generated in the order of request?

Default: ""
cacheSize integer

Number of values to fetch per query

Default: ""
dataType string

Data type of the sequence

Default: ""
cycle boolean

Can the sequence cycle when it hits the max value?

Default: ""
alterSequence object

Alters properties of an existing sequence.

sequenceName string required

Name of the sequence to alter

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
incrementBy integer

New amount the sequence should increment by

Default: ""
maxValue integer

New maximum value for the sequence

Default: ""
minValue integer

New minimum value for the sequence

Default: ""
ordered boolean

Does the sequence need to be guaranteed to be generated in the order of request?

Default: ""
cacheSize integer

Change the cache size

Default: ""
dataType string

Data type of the sequence

Default: ""
cycle boolean

Can the sequence cycle when it hits the max value?

Default: ""
dropSequence object

Drops an existing sequence.

sequenceName string required

Name of the sequence to drop

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
renameSequence object

Renames an existing sequence.

oldSequenceName string required

Name of the sequence to rename

Default: ""
newSequenceName string required

New name for the sequence

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
createIndex object

The createIndex Change Type creates an index on an existing column or a set of columns.

tableName string required

The name of the table

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
indexName string

The name of the index to create.

Default: ""
associatedWith string
Default: ""
unique boolean

The unique values in the index.

Default: false
clustered boolean

The attribute that creates a clustered index.

Default: false
tablespace string

The tablespace in which you create the index.

Default: ""
column object
Default:
{}
34 nested properties
name string required

The name of the column.

Default: ""
computed boolean

The attribute which is used if the value in name isn't actually a column name but a function. Since 3.3.0

Default: false
descending boolean

The boolean attribute which allows you to specify that a column should be used in a descending order in the index if it is used in a createIndex command. Default value is false (in an ascending order) Since 3.4

Default: false
type string

The column data type.

Default: ""
value string

The value for which to set the column. The value will be surrounded by quote marks and nested quote marks will be escaped.

Default: ""
valueNumeric number

The numeric value to set the column to. The value will not be escaped and will not be nested in quote marks.

Default: ""
valueBoolean boolean

The boolean value to set the column to. The actual value string inserted will depend on the database implementation.

Default: ""
valueDate string

The date and time value to set the column to. The value is specified in one of the following forms: YYYY-MM-DD, hh:mm:ss, or YYYY-MM-DDThh:mm:ss.

Default: ""
valueComputed string

The value that is returned from a function or procedure call. This attribute will contain the function to call.

Default: ""
valueSequenceCurrent string

The name of the sequence in which the current value is used.

Default: ""
valueSequenceNext string

The name of the sequence in which the next value is used.

Default: ""
valueBlobFile string

The path to a file, whose contents will be written as a BLOB (i.e. chunk of binary data).

The path to the changelog file location must be either absolute or relative. An example of an absolute path is: /usr/local/somefile.dat on Unix or c:\Directory\somefile.dat on Windows.

Default: ""
valueClobFile string

The path to a file, whose contents will be written as a CLOB (i.e. chunk of character data). The path to the changelog file location must be either absolute or relative. An example of an absolute path is: /usr/local/somefile.dat on Unix or c:\Directory\somefile.dat on Windows.

Default: ""
defaultValue string

The default value for column.

Default: ""
defaultValueNumeric number

The default numeric value for column.

Default: ""
defaultValueDate string

The default date and time value for column. The value is specified in one of the following forms: YYYY-MM-DD, hh:mm:ss, or YYYY-MM-DDThh:mm:ss.

Default: ""
defaultValueBoolean boolean

The default boolean value for column.

Default: false
defaultValueComputed string

The default value that is returned from a function or procedure call. This attribute will contain the function to call.

Default: ""
defaultValueSequenceCurrent string
Default: ""
defaultValueSequenceNext string
Default: ""
defaultValueConstraintName string
Default: ""
autoIncrement boolean

The auto-increment column. Ignored on databases that do not support the autoincrement/identity functionality.

Default: false
startWith integer

The value auto-increment start. Ignored on databases that do not support autoincrement/identity functionality.

Default: 0
incrementBy integer

The value of each step by auto-increment. Ignored on databases that do not support autoincrement/identity functionality.

Default: 0
generationType string
Default: ""
defaultOnNull boolean
Default: false
remarks string

A short description of the column (column comment).

Default: ""
encoding string

The name of the encoding (specified in java.nio.Charset javadoc, e.g. "UTF-8") of the CLOB file (specified in valueClobFile) contents.

Default: ""
beforeColumn string

The attribute that allows you to control where in the table column order the new column goes if it is used in an addColumn command. Only one of beforeColumn, afterColumn, or position is allowed. Since 3.1

Default: ""
afterColumn string

The attribute that allows you to control where in the table column order the new column goes if it is used in an addColumn command. Only one of beforeColumn, afterColumn, or position is allowed. Since 3.1

Default: ""
position number

The attribute that allows you to control where in the table column order the new column goes if it is used in an addColumn command. Only one of beforeColumn, afterColumn, or position is allowed. Uses one based index. Since 3.1

Default: ""
header string

Name of the column in the CSV file from which the value for the column will be taken if its different from the column name. Ignored if index is also defined.

Default: ""
index integer

Index of the column in the CSV file from which the value for the column will be taken.

Default: ""
constraints object

Constraint definitions

Default:
{}
21 nested properties
nullable boolean

The attribute that defines whether the column is nullable.

Default: false
notNullConstraintName string

The not null constraint name.

Default: ""
primaryKey boolean

The attribute that defines whether the column is a primary key.

Default: false
primaryKeyName string

The primary key name Since 1.6.

Default: ""
primaryKeyTablespace string

The tablespace to use for the defined primary key.

Default: ""
unique boolean

The attribute that defines whether a unique clause should be applied.

Default: false
uniqueConstraintName string

The unique constraint name.

Default: ""
references string

The foreign key definition.

Default: ""
referencedTableCatalogName string

The name of the catalog.

Default: ""
referencedTableSchemaName string

The name of the schema.

Default: ""
referencedTableName string

The name of the table.

Default: ""
referencedColumnNames string

The name of the column.

Default: ""
foreignKeyName string

The foreign key name.

Default: ""
deleteCascade boolean

The attribute that sets delete cascade.

Default: false
deferrable boolean

The attribute that defines whether constraints are deferrable.

Default: false
initiallyDeferred boolean

The attribute that defines whether constraints are initially deferred.

Default: false
checkConstraint string

The attribute that defines whether to validate the defined check constraint.

Default: ""
validateNullable boolean

The attribute that defines whether to validate the defined not null constraint.

Default: false
validateUnique boolean

The attribute that defines whether to validate the defined unique constraint.

Default: false
validatePrimaryKey boolean

The attribute that defines whether to validate the defined primary key constraint.

Default: false
validateForeignKey boolean

The attribute that defines whether to validate the defined foreign key constraint.

Default: false
columns object[]

The column constraint and foreign key information. Setting the defaultValue attribute will specify a default value for the column. Setting the value attribute will set all rows existing to the specified value without modifying the column default. See Information about the tag section for more information.

Default:
[]
minItems=1
dropIndex object

The dropIndex Change Type drops an existing index on a column.

indexName string required

The name of the index to drop.

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
tableName string

The name of the table

Default: ""
associatedWith string
Default: ""
addNotNullConstraint object

The addNotNullConstraint Change Type adds a NOT NULL constraint to an existing table.

tableName string required

The name of the table

Default: ""
columnName string required

The name of the column for which to add the constraint.

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
defaultNullValue string

The value for which you can set all values that currently equal null in a column. If null values exist and if defaultNullValue is not set, the change will fail.

Default: ""
columnDataType string

The current data type of the column.

Default: ""
constraintName string

The created constraint name (if database supports names for NOT NULL constraints).

Default: ""
validate boolean

The attribute which is true if the NOT NULL constraint has 'ENABLE VALIDATE' set, or which is false if the NOT NULL constrain has 'ENABLE NOVALIDATE' set.

Default: false
dropNotNullConstraint object

Makes a column nullable.

tableName string required

The name of the table

Default: ""
columnName string required

Name of the column to drop the constraint from

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
columnDataType string

Current data type of the column

Default: ""
constraintName string

Name of the constraint to drop (if database supports names for NOT NULL constraints)

Default: ""
addForeignKeyConstraint object

Adds a foreign key constraint to an existing column.

baseTableName string required

Name of the table containing the column to constraint

Default: ""
baseColumnNames string required

Name of column(s) to place the foreign key constraint on. Comma-separate if multiple

Default: ""
constraintName string required

Name of the new foreign key constraint

Default: ""
referencedTableName string required

Name of the table the foreign key points to

Default: ""
referencedColumnNames string required

Column(s) the foreign key points to. Comma-separate if multiple

Default: ""
baseTableCatalogName string

Catalog name of the base table

Default: ""
baseTableSchemaName string

Schema name of the base table

Default: ""
referencedTableCatalogName string

Schema name of the referenced table

Default: ""
referencedTableSchemaName string

Schema name of the referenced table

Default: ""
deferrable boolean

Is the foreign key deferrable

Default: false
initiallyDeferred boolean

Is the foreign key initially deferred

Default: false
deleteCascade boolean
Default: false
onDelete string

ON DELETE functionality. Possible values: 'CASCADE', 'SET NULL', 'SET DEFAULT', 'RESTRICT', 'NO ACTION'

Default: ""
onUpdate string

ON UPDATE functionality. Possible values: 'CASCADE', 'SET NULL', 'SET DEFAULT', 'RESTRICT', 'NO ACTION'

Default: ""
referencesUniqueColumn boolean
Default: false
validate boolean

Shall be true if the foreign key should 'ENABLE VALIDATE' set, or false if the foreign key should 'ENABLE NOVALIDATE' set.

Default: false
dropForeignKeyConstraint object

Drops an existing foreign key.

baseTableName string required

Name of the table containing the column constrained by the foreign key

Default: ""
constraintName string required

Name of the foreign key constraint to drop

Default: ""
baseTableCatalogName string
Default: ""
baseTableSchemaName string
Default: ""
dropAllForeignKeyConstraints object

Drops all foreign key constraints for a table.

baseTableName string required

Name of the table containing columns constrained by foreign keys

Default: ""
baseTableCatalogName string

Catalog name of the table containing columns constrained by foreign keys

Default: ""
baseTableSchemaName string

Schema name of the table containing columns constrained by foreign keys

Default: ""
addPrimaryKey object

Adds a primary key out of an existing column or set of columns.

tableName string required

The name of the table

Default: ""
columnNames string required

Name of the column(s) to create the primary key on. Comma separated if multiple

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
constraintName string

Name of primary key constraint

Default: ""
tablespace string
Default: ""
clustered boolean
Default: false
forIndexCatalogName string
Default: ""
forIndexSchemaName string
Default: ""
forIndexName string
Default: ""
validate boolean

This is true if the primary key has 'ENABLE VALIDATE' set, or false if the primary key has 'ENABLE NOVALIDATE' set.

Default: false
dropPrimaryKey object

The dropPrimaryKey Change Type drops an existing primary key in the table.

tableName string required

The name of the table

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
constraintName string

The name of the primary key.

Default: ""
dropIndex boolean

The index to drop.

Default: ""
addLookupTable object

Creates a lookup table containing values stored in a column and creates a foreign key to the new table.

existingTableName string required

Name of the table containing the data to extract

Default: ""
existingColumnName string required

Name of the column in the new table to create

Default: ""
newTableName string required

Name of lookup table to create

Default: ""
newColumnName string required

Name of the column in the new table to create

Default: ""
existingTableCatalogName string
Default: ""
existingTableSchemaName string
Default: ""
newTableCatalogName string
Default: ""
newTableSchemaName string
Default: ""
newColumnDataType string

Data type of the new table column

Default: ""
constraintName string

Name of the foreign-key constraint to create between the existing table and the lookup table

Default: ""
addAutoIncrement object

Converts an existing column to be an auto-increment (a.k.a 'identity') column.

tableName string required

The name of the table

Default: ""
columnName string required

Name of the column

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
defaultOnNull boolean

When using generationType 'BY DEFAULT' then defaultOnNull = true allows the identity to be used if the identity column is referenced, but a value of NULL is specified.

Default: ""
generationType enum

Type of the generation in 'GENERATED %s AS IDENTITY'. ALWAYS | BY DEFAULT

Default: ""
Values: "ALWAYS" "BY DEFAULT"
columnDataType string

Current data type of the column to make auto-increment

Default: ""
startWith integer

Initial integer value of the increment

Default: 0
incrementBy integer

Integer value the increment increments at each call

Default: 0
addDefaultValue object

The addDefaultValue Change Type adds a default value to the database definition for the specified column.

tableName string required

The name of the table

Default: ""
columnName string required

The name of the column for which to add a default value.

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
columnDataType string

The current data type of the column for which to add a default value.

Default: ""
defaultValue string

The default value. Either this property or one of the other defaultValue* properties are required.

Default: ""
defaultValueNumeric number

The attribute that sets the default value for a column of a numeric type. For example: integer, bigint, bigdecimal, and others.

Default: ""
defaultValueDate string

The attribute that sets the default value for a column of a date type. For example: timestamp, datetime, date, and others.

Default: ""
defaultValueBoolean boolean

The attribute that sets the default value for a column of a boolean type.

Default: ""
defaultValueComputed string

The attribute that sets the default value for a column using a function which returns value of the same type as the column has.

Default: ""
defaultValueSequenceNext string

The attribute that sets value for a specified column by using the value of the existing sequence. With every new input, the next value of the sequence will be taken.

Default: ""
defaultValueConstraintName string

The attribute that sets a unique name for default constraint used for a specific column. It works only along with any of defaultValue* attributes listed.

Default: ""
dropDefaultValue object

Removes the database default value for a column.

tableName string required

The name of the table

Default: ""
columnName string required

Name of column to drop the default value from

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
columnDataType string
Default: ""
addUniqueConstraint object

Adds a unique constraint to an existing column or set of columns.

tableName string required

The name of the table

Default: ""
columnNames string required

Name of the column(s) to create the unique constraint on. Comma separated if multiple

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
constraintName string

Name of the unique constraint

Default: ""
tablespace string

'Tablespace' to create the index in. Corresponds to file group in mssql

Default: ""
disabled boolean

True if this constraint is disabled, False otherwise

Default: false
deferrable boolean

True if this constraint is deferrable, False otherwise

Default: false
initiallyDeferred boolean

True if this constraint is initially deferred, False otherwise

Default: false
forIndexCatalogName string
Default: ""
forIndexSchemaName string
Default: ""
forIndexName string
Default: ""
clustered boolean

Whether create a clustered index

Default: false
validate boolean

Should be true if the unique constraint shall 'ENABLE VALIDATE' set, or false if the 'ENABLE NOVALIDATE' shall.

Default: false
dropUniqueConstraint object

Drops an existing unique constraint.

tableName string required

The name of the table

Default: ""
constraintName string required

Name of unique constraint to drop

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
uniqueColumns string
Default: ""
setTableRemarks object

Sets remarks on a table.

tableName string required

The name of the table

Default: ""
remarks string required

Comment to set on the table

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
setColumnRemarks object

The setColumnRemarks Change Type sets remarks on a column.

tableName string required

The name of the table

Default: ""
columnName string required

The name of the column

Default: ""
remarks string required

The comment to set on the column

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
customChange object

The customChange type creates a custom Change Type class.

class string required
Default: ""
loadData object

Loads data from a CSV file into an existing table when you add it to your changelog.

tableName string required

The name of the table

Default: ""
file string required

CSV file to load.

Default: ""
catalogName string

The name of the catalog

Default: ""
schemaName string

The name of the schema

Default: ""
relativeToChangelogFile boolean

Whether the file path relative to the root changelog file rather than to the classpath.

Default: false
usePreparedStatements boolean

Use prepared statements instead of insert statement strings if the database supports it.

Default: false
encoding string

Encoding of the CSV file (defaults to UTF-8).

Default: ""
separator string

Character separating the fields.

Default: ""
quotchar string

The quote character for string fields containing the separator character.

Default: ""
commentLineStartsWith string

Lines starting with this are treated as comment and ignored.

Default: ""
column object
Default:
{}
34 nested properties
name string required

The name of the column.

Default: ""
computed boolean

The attribute which is used if the value in name isn't actually a column name but a function. Since 3.3.0

Default: false
descending boolean

The boolean attribute which allows you to specify that a column should be used in a descending order in the index if it is used in a createIndex command. Default value is false (in an ascending order) Since 3.4

Default: false
type string

The column data type.

Default: ""
value string

The value for which to set the column. The value will be surrounded by quote marks and nested quote marks will be escaped.

Default: ""
valueNumeric number

The numeric value to set the column to. The value will not be escaped and will not be nested in quote marks.

Default: ""
valueBoolean boolean

The boolean value to set the column to. The actual value string inserted will depend on the database implementation.

Default: ""
valueDate string

The date and time value to set the column to. The value is specified in one of the following forms: YYYY-MM-DD, hh:mm:ss, or YYYY-MM-DDThh:mm:ss.

Default: ""
valueComputed string

The value that is returned from a function or procedure call. This attribute will contain the function to call.

Default: ""
valueSequenceCurrent string

The name of the sequence in which the current value is used.

Default: ""
valueSequenceNext string

The name of the sequence in which the next value is used.

Default: ""
valueBlobFile string

The path to a file, whose contents will be written as a BLOB (i.e. chunk of binary data).

The path to the changelog file location must be either absolute or relative. An example of an absolute path is: /usr/local/somefile.dat on Unix or c:\Directory\somefile.dat on Windows.

Default: ""
valueClobFile string

The path to a file, whose contents will be written as a CLOB (i.e. chunk of character data). The path to the changelog file location must be either absolute or relative. An example of an absolute path is: /usr/local/somefile.dat on Unix or c:\Directory\somefile.dat on Windows.

Default: ""
defaultValue string

The default value for column.

Default: ""
defaultValueNumeric number

The default numeric value for column.

Default: ""
defaultValueDate string

The default date and time value for column. The value is specified in one of the following forms: YYYY-MM-DD, hh:mm:ss, or YYYY-MM-DDThh:mm:ss.

Default: ""
defaultValueBoolean boolean

The default boolean value for column.

Default: false
defaultValueComputed string

The default value that is returned from a function or procedure call. This attribute will contain the function to call.

Default: ""
defaultValueSequenceCurrent string
Default: ""
defaultValueSequenceNext string
Default: ""
defaultValueConstraintName string
Default: ""
autoIncrement boolean

The auto-increment column. Ignored on databases that do not support the autoincrement/identity functionality.

Default: false
startWith integer

The value auto-increment start. Ignored on databases that do not support autoincrement/identity functionality.

Default: 0
incrementBy integer

The value of each step by auto-increment. Ignored on databases that do not support autoincrement/identity functionality.

Default: 0
generationType string
Default: ""
defaultOnNull boolean
Default: false
remarks string

A short description of the column (column comment).

Default: ""
encoding string

The name of the encoding (specified in java.nio.Charset javadoc, e.g. "UTF-8") of the CLOB file (specified in valueClobFile) contents.

Default: ""
beforeColumn string

The attribute that allows you to control where in the table column order the new column goes if it is used in an addColumn command. Only one of beforeColumn, afterColumn, or position is allowed. Since 3.1

Default: ""
afterColumn string

The attribute that allows you to control where in the table column order the new column goes if it is used in an addColumn command. Only one of beforeColumn, afterColumn, or position is allowed. Since 3.1

Default: ""
position number

The attribute that allows you to control where in the table column order the new column goes if it is used in an addColumn command. Only one of beforeColumn, afterColumn, or position is allowed. Uses one based index. Since 3.1

Default: ""
header string

Name of the column in the CSV file from which the value for the column will be taken if its different from the column name. Ignored if index is also defined.

Default: ""
index integer

Index of the column in the CSV file from which the value for the column will be taken.

Default: ""
constraints object

Constraint definitions

Default:
{}
21 nested properties
nullable boolean

The attribute that defines whether the column is nullable.

Default: false
notNullConstraintName string

The not null constraint name.

Default: ""
primaryKey boolean

The attribute that defines whether the column is a primary key.

Default: false
primaryKeyName string

The primary key name Since 1.6.

Default: ""
primaryKeyTablespace string

The tablespace to use for the defined primary key.

Default: ""
unique boolean

The attribute that defines whether a unique clause should be applied.

Default: false
uniqueConstraintName string

The unique constraint name.

Default: ""
references string

The foreign key definition.

Default: ""
referencedTableCatalogName string

The name of the catalog.

Default: ""
referencedTableSchemaName string

The name of the schema.

Default: ""
referencedTableName string

The name of the table.

Default: ""
referencedColumnNames string

The name of the column.

Default: ""
foreignKeyName string

The foreign key name.

Default: ""
deleteCascade boolean

The attribute that sets delete cascade.

Default: false
deferrable boolean

The attribute that defines whether constraints are deferrable.

Default: false
initiallyDeferred boolean

The attribute that defines whether constraints are initially deferred.

Default: false
checkConstraint string

The attribute that defines whether to validate the defined check constraint.

Default: ""
validateNullable boolean

The attribute that defines whether to validate the defined not null constraint.

Default: false
validateUnique boolean

The attribute that defines whether to validate the defined unique constraint.

Default: false
validatePrimaryKey boolean

The attribute that defines whether to validate the defined primary key constraint.

Default: false
validateForeignKey boolean

The attribute that defines whether to validate the defined foreign key constraint.

Default: false
columns object[]

The column constraint and foreign key information. Setting the defaultValue attribute will specify a default value for the column. Setting the value attribute will set all rows existing to the specified value without modifying the column default. See Information about the tag section for more information.

Default:
[]
minItems=1
loadUpdateData object

Loads or updates data from a CSV file into an existing table. Differs from loadData by issuing a SQL batch that checks for the existence of a record. If found, the record is UPDATEd, else the record is INSERTed. Also, generates DELETE statements for a rollback.

A value of NULL in a cell will be converted to a database NULL rather than the string 'NULL'

tableName string required

The name of the table

Default: ""
file string required

CSV file to load

Default: ""
primaryKey string required

Comma delimited list of the columns for the primary key

Default: ""
catalogName string

The name of the catalog

Default: ""
commentLineStartsWith string

Lines starting with this are treated as comment and ignored.

Default: ""
schemaName string

The name of the schema

Default: ""
relativeToChangelogFile boolean

Whether the file path relative to the root changelog file rather than to the classpath.

Default: false
encoding string

Encoding of the CSV file (defaults to UTF-8)

Default: ""
onlyUpdate boolean

If true, records with no matching database record should be ignored

Default: ""
separator string

Character separating the fields.

Default: ""
quotchar string

The quote character for string fields containing the separator character.

Default: ""
usePreparedStatements boolean

Use prepared statements instead of insert statement strings if the DB supports it.

Default: ""
column object
Default:
{}
34 nested properties
name string required

The name of the column.

Default: ""
computed boolean

The attribute which is used if the value in name isn't actually a column name but a function. Since 3.3.0

Default: false
descending boolean

The boolean attribute which allows you to specify that a column should be used in a descending order in the index if it is used in a createIndex command. Default value is false (in an ascending order) Since 3.4

Default: false
type string

The column data type.

Default: ""
value string

The value for which to set the column. The value will be surrounded by quote marks and nested quote marks will be escaped.

Default: ""
valueNumeric number

The numeric value to set the column to. The value will not be escaped and will not be nested in quote marks.

Default: ""
valueBoolean boolean

The boolean value to set the column to. The actual value string inserted will depend on the database implementation.

Default: ""
valueDate string

The date and time value to set the column to. The value is specified in one of the following forms: YYYY-MM-DD, hh:mm:ss, or YYYY-MM-DDThh:mm:ss.

Default: ""
valueComputed string

The value that is returned from a function or procedure call. This attribute will contain the function to call.

Default: ""
valueSequenceCurrent string

The name of the sequence in which the current value is used.

Default: ""
valueSequenceNext string

The name of the sequence in which the next value is used.

Default: ""
valueBlobFile string

The path to a file, whose contents will be written as a BLOB (i.e. chunk of binary data).

The path to the changelog file location must be either absolute or relative. An example of an absolute path is: /usr/local/somefile.dat on Unix or c:\Directory\somefile.dat on Windows.

Default: ""
valueClobFile string

The path to a file, whose contents will be written as a CLOB (i.e. chunk of character data). The path to the changelog file location must be either absolute or relative. An example of an absolute path is: /usr/local/somefile.dat on Unix or c:\Directory\somefile.dat on Windows.

Default: ""
defaultValue string

The default value for column.

Default: ""
defaultValueNumeric number

The default numeric value for column.

Default: ""
defaultValueDate string

The default date and time value for column. The value is specified in one of the following forms: YYYY-MM-DD, hh:mm:ss, or YYYY-MM-DDThh:mm:ss.

Default: ""
defaultValueBoolean boolean

The default boolean value for column.

Default: false
defaultValueComputed string

The default value that is returned from a function or procedure call. This attribute will contain the function to call.

Default: ""
defaultValueSequenceCurrent string
Default: ""
defaultValueSequenceNext string
Default: ""
defaultValueConstraintName string
Default: ""
autoIncrement boolean

The auto-increment column. Ignored on databases that do not support the autoincrement/identity functionality.

Default: false
startWith integer

The value auto-increment start. Ignored on databases that do not support autoincrement/identity functionality.

Default: 0
incrementBy integer

The value of each step by auto-increment. Ignored on databases that do not support autoincrement/identity functionality.

Default: 0
generationType string
Default: ""
defaultOnNull boolean
Default: false
remarks string

A short description of the column (column comment).

Default: ""
encoding string

The name of the encoding (specified in java.nio.Charset javadoc, e.g. "UTF-8") of the CLOB file (specified in valueClobFile) contents.

Default: ""
beforeColumn string

The attribute that allows you to control where in the table column order the new column goes if it is used in an addColumn command. Only one of beforeColumn, afterColumn, or position is allowed. Since 3.1

Default: ""
afterColumn string

The attribute that allows you to control where in the table column order the new column goes if it is used in an addColumn command. Only one of beforeColumn, afterColumn, or position is allowed. Since 3.1

Default: ""
position number

The attribute that allows you to control where in the table column order the new column goes if it is used in an addColumn command. Only one of beforeColumn, afterColumn, or position is allowed. Uses one based index. Since 3.1

Default: ""
header string

Name of the column in the CSV file from which the value for the column will be taken if its different from the column name. Ignored if index is also defined.

Default: ""
index integer

Index of the column in the CSV file from which the value for the column will be taken.

Default: ""
constraints object

Constraint definitions

Default:
{}
21 nested properties
nullable boolean

The attribute that defines whether the column is nullable.

Default: false
notNullConstraintName string

The not null constraint name.

Default: ""
primaryKey boolean

The attribute that defines whether the column is a primary key.

Default: false
primaryKeyName string

The primary key name Since 1.6.

Default: ""
primaryKeyTablespace string

The tablespace to use for the defined primary key.

Default: ""
unique boolean

The attribute that defines whether a unique clause should be applied.

Default: false
uniqueConstraintName string

The unique constraint name.

Default: ""
references string

The foreign key definition.

Default: ""
referencedTableCatalogName string

The name of the catalog.

Default: ""
referencedTableSchemaName string

The name of the schema.

Default: ""
referencedTableName string

The name of the table.

Default: ""
referencedColumnNames string

The name of the column.

Default: ""
foreignKeyName string

The foreign key name.

Default: ""
deleteCascade boolean

The attribute that sets delete cascade.

Default: false
deferrable boolean

The attribute that defines whether constraints are deferrable.

Default: false
initiallyDeferred boolean

The attribute that defines whether constraints are initially deferred.

Default: false
checkConstraint string

The attribute that defines whether to validate the defined check constraint.

Default: ""
validateNullable boolean

The attribute that defines whether to validate the defined not null constraint.

Default: false
validateUnique boolean

The attribute that defines whether to validate the defined unique constraint.

Default: false
validatePrimaryKey boolean

The attribute that defines whether to validate the defined primary key constraint.

Default: false
validateForeignKey boolean

The attribute that defines whether to validate the defined foreign key constraint.

Default: false
columns object[]

The column constraint and foreign key information. Setting the defaultValue attribute will specify a default value for the column. Setting the value attribute will set all rows existing to the specified value without modifying the column default. See Information about the tag section for more information.

Default:
[]
minItems=1
executeCommand object

The executeCommand Change Type executes a system command.

executable string required

The name of the executable to run

Default: ""
os string

The list of operating systems on which to execute the command (taken from the os.name Java system property)

Default: ""
timeout string

The timeout value for executable to run

Default: ""
arg object

Arguments for the executable

Default:
{}
1 nested properties
value string

The value of the attribute (for example: '-param')

Default: ""
args object[]

Arguments for the executable

output object

Logs a message and continues execution.

message string

Message to output

Default: ""
target enum

Target for message. Possible values: STDOUT, STDERR, FATAL, WARN, INFO, DEBUG. Default value: STDERR

Default: "STDERR"
Values: "STDOUT" "STDERR" "FATAL" "WARN" "INFO" "DEBUG"
modifySql object

Although Liquibase supports most standard SQL statements with its Change Types, there are times when you need the generated SQL to be different. The following examples show how to change data types or add additional vendor-specific clauses such as ENGINE INNODB to CREATE TABLE statements. Since 1.9

dbms string

Specifies logical expression of database type(s) on which the change must be applied. Valid database type names are listed on the supported databases page. It can be a comma-separated list of multiple databases or you can also specify that a change is not applicable to a particular database type by prefixing with !. The keywords all and none are also available.

Default: ""
context string

Specifies the list of Contexts in which to run the SQL modification. If you do not specify any context, every changeset will be applied. Since 2.0

Default: ""
labels string
Default: ""
applyToRollback boolean

Defines whether the SQL modification should be applied to rollback statements. The default value is false. Since 2.0

Default: false
prepend object

Adds SQL to the beginning of the statement.

Default:
{}
1 nested properties
value string
append object

Adds SQL to the end of the statement.

Default:
{}
1 nested properties
value string
replace object

Replaces all instances of the text specified.

Default:
{}
2 nested properties
replace string
with string
regExpReplace object

Replaces all instances of the regular expression specified.

Default:
{}
2 nested properties
replace string
with string
changes object[]