- Reference
- Version ยท 6.0.2
- Change Automation Reference
generate-changelog
Last updated: November 17, 2026
The generate-changelog command creates a changelog file that has a sequence of changesets which describe how to re-create the current state of the database.
Uses
The generate-changelog command is typically used when you want to capture the current state of a database, then apply those changes to any number of databases. This is typically only done when a project has an existing database, but hasn't used Liquibase before. See How to set up Liquibase with an Existing Project and Multiple Environments for more details.
Note: When using the update command to apply the changes in the changelog, Liquibase will not create a new database or schema. You must create them before applying the changelog to it.
Run the generate-changelog command
In this example, our sample database has the following content:

Note: The username and password attributes are not required for connections and systems which use alternate means of authentication. Also, you can specify database credentials as part of the url attribute.
* --include-tablespace only captures the tablespace if it was specified in the create table statement.
Output changelogs
The generate-changelog command generates a changelog that contains all your objects (represented as changesets) and places the file in the same directory where the command was ran.
The extension you provide determines the format of the changelog, so if you specify the filename as changelog.xml, you will get an XML formatted changelog. However, if you specify the filename as changelog.yaml, changelog.json, or changelog.sql, you will get changelogs formatted in YAML, JSON, or SQL, respectively.
Note: By default, Liquibase does not split statements for formatted SQL changelogs because splitStatements is set to false in the changelog. If the generatedSQL has multiple SQL statements, then Liquibase adds splitStatements:true to the changelog.
Learn more about split statements here: sql
Pretty-printed SQL output
When you generate a changelog in SQL format, Liquibase can write each statement it recognizes across several lines instead of one long line, so the file stays readable and produces a useful git diff.
The --changelog-pretty-print-sql global parameter controls this, and it is false by default, so each statement is written on a single line. Set it to true to turn pretty-printing on. The parameter covers any command that writes a SQL-format changelog, including diff-changelog.
Note: Pretty-printing adds line breaks and indentation and nothing else. Liquibase does not rewrite or reinterpret your SQL, and column types are written exactly as the database reported them. Your checksums are unaffected, because Liquibase strips whitespace out of a statement before it computes the changeset checksum.
This example shows one table as Liquibase writes it without pretty-printing and with it:
What Liquibase formats
Liquibase reformats these statements on any database platform:
CREATE TABLE: One column per line, including table-level
PRIMARY KEY,FOREIGN KEY, andUNIQUEconstraint clauses.CREATE INDEX: One column per line. The
UNIQUE,BITMAP,CLUSTERED,NONCLUSTERED,HASH,SPATIAL, andFULLTEXTmodifiers are all recognized.ALTER TABLE ... ADD CONSTRAINT: Primary key, foreign key, and unique constraints, with long
REFERENCES,ON UPDATE, andON DELETEchains split across lines. ACHECKconstraint holds an expression rather than a column list, so it stays on one line.CREATE VIEW:
SELECT,FROM,WHERE,GROUP BY,HAVING,ORDER BY,JOIN, andUNIONeach start a new line. Materialized views are included.CREATE SEQUENCE:
START WITH,INCREMENT BY,MINVALUE,MAXVALUE,CACHE,ORDER, andCYCLEeach start a new line.CREATE TYPE ... AS (...): One attribute per line, for PostgreSQL composite types.
Microsoft SQL Server extended properties: One argument per line in the
sp_addextendedpropertyandsp_updateextendedpropertyblocks. These are the longest statements Liquibase generates, reaching 800 characters on a single line.
A list holding a single column or attribute stays on one line, because splitting it gains nothing. A primary key or other table-level constraint counts as an item in the list, so a table with one column and a primary key is still split across lines.
What Liquibase leaves alone
Anything Liquibase does not recognize is written exactly as it was generated. That includes:
Stored logic: Procedures, functions, triggers, and packages are never reformatted. The database returns these bodies as their author wrote them, and reformatting procedural code risks corrupting it.
Statements that are already short:
COMMENT ON,GRANT,REVOKE, default values, autoincrement andNOT NULLconstraints, drops, and renames.Data statements:
INSERT,UPDATE,DELETE, andMERGE.
Note: For the directory layout that each --object-changelogs value writes to disk, including the by-table layout, see Generate your changelog structure with --object-changelogs.
Column default values
The generate-changelog command writes each column default as the database reports it, so the generated changelog deploys and the new database gets the same default. In Liquibase Secure 6.0.2 and later, this includes these literal defaults:
H2
uuidandbinary(n)columns: The default keeps its quotes, such as'00000000-0000-0000-0000-000000000001'. Earlier versions wrote it without quotes, so H2 stored auuiddefault as the number-1, and abinary(n)default madeCREATE TABLEfail.MariaDB
binary(n), OracleRAWandLONG RAW, DB2 and DerbyCHAR FOR BIT DATA, and SQL Anywherebinarycolumns: The default keeps its quotes, so the generated changelog deploys with the same default.MySQL and MariaDB
bit(n)columns: A default with more than one bit, such asb'1010', is written asdefaultValueComputed="b'1010'". Earlier versions stopped withUnknown boolean value(LB-CHG-0032). MariaDBbitcolumns also keep their size, such asBIT(4).MySQL 8
binaryandvarbinarycolumns: The default is written as the hexadecimal literal MySQL reports, such as0x61626364. Earlier versions wrote0X61626364, which MySQL rejects.
Any other default that a database reports as a single word starting with a digit also keeps the case the database reports, such as a SQL Server hex default or an Oracle number like 1e5. The upper-case and lower-case forms both deploy on those databases.
On SQLite, Liquibase Secure 6.0.2 and later write a function or expression default as defaultValueComputed, such as defaultValueComputed="CURRENT_TIMESTAMP" or defaultValueComputed="(datetime('now'))". A text default that holds an apostrophe is written as its quoted literal, such as defaultValueComputed="'it''s'". Earlier versions wrote a function default as a plain string, so the new database got the text CURRENT_TIMESTAMP. They also added extra quotes to an apostrophe default.
Note: Check these defaults by hand after you generate a changelog:
On MySQL 5.7,
binarydefaults are written as raw bytes and do not deploy.On MySQL 8, a
binarydefault ends at its first zero byte. An empty default, or one that starts with a zero byte, is written as0xand does not deploy. A default such as0x61006263is written as0x61and deploys with a different value.On MySQL 8, an expression default such as
DEFAULT (b'1010')still fails.On HSQLDB,
bitcolumns are generated asBOOLEAN, so that output does not deploy.
Changelogs and snapshots from earlier versions
A changelog that an earlier version generated keeps the old default text. Generate it again, or correct the values by hand. For example, change 0X61626364 to 0x61626364 for MySQL.
A snapshot file that an earlier version saved holds the old form of these defaults. Take a new snapshot of each database you compare against after you upgrade. Until you do, a snapshot from an earlier version has these effects:
A
diffor drift report against it shows the quoted defaults on H2, MariaDB, Oracle, DB2, Derby and SQL Anywhere, and MySQL and MariaDBbit(n)columns, as changed even when nothing changed. A hex default that differs only in case, such as0X61626364and0x61626364, is not reported.A
diff-changelogthat copies a default from it writes the old value into the changelog, including a0Xdefault that MySQL rejects. For a MySQL or MariaDBbit(n)column, it writes no default value instead, so the changelog fails withdefaultValue is required, ordiff-changelogstops withLB-CHG-0032.
On SQLite, a diff or diff-changelog against a snapshot file that an earlier version saved shows columns with a function, expression or apostrophe default as changed, even when nothing changed.
Default diff types
Specific diff types
Parameters
Global parameters
Attribute | Definition | Requirement |
| When | Optional |
| Comma-separated list of Example: Uses prefix matching: โข With a trailing dot (e.g., โข Without a trailing dot (e.g., Ignored if | Optional |
| When Use this to prevent false positive drift detection caused by system-managed If both this parameter and Default: | Optional |
| Your Liquibase Secure license key | Required |
| Liquibase Secure 5.1.0+. Oracle only. Sets the maximum number of rows Liquibase loads into memory from a single query while it inspects your database. If a query returns more rows, the command fails with an error. Set it to | Optional |
Command parameters
Attribute | Definition | Requirement |
| The JDBC database connection URL. | Required |
| Specifies the author for changesets in the generated changelog. | Optional |
| Changelog file to write results | Optional |
| Specifies the context filter to generate and apply to all changesets in your changelog. Useful to set many contexts quickly. Similar to the set-contexts command. Available in Liquibase 4.24.0 and later. Contexts are tags you can add to changesets to control which changesets will be executed in any particular migration run. After generating changesets with contexts, to deploy specific changes according to these contexts, you must run a command that specifies a context filter. For example, | Optional |
| Specifies a directory to send the loadData output to a CSV file which is generated by running the | Optional |
| Name of the default catalog to use for the database connection | Optional |
| Name of the default schema to use for the database connection. If Note: In the properties file and Note: In Liquibase 4.12.0 and later, you can use mixed-case schema names if you set | Optional |
| Specifies the types of objects to compare. Specify multiple values as a comma-separated list (without spaces). Valid values are: If null, default types are Liquibase Secure 5.1.0+. Snowflake accepted values are: Note: For Snowflake, unique constraints are not snapshotted as standalone objects. Instead, uniqueness is captured as the Snowflake view and table support has been enhanced with four Snowflake- Note: The diff types | Optional |
| The JDBC driver class | Optional |
| The JDBC driver properties file | Optional |
| Objects to exclude from diff | Optional |
| Controls behavior when snapshots reference objects from schemas not included in the snapshot (like cross-schema triggers or foreign keys)
Default: | Optional |
| If | Optional |
| Objects to include in diff | Optional |
| If When specifying multiple schemas see Diff multiple schemas in Liquibase for file path considerations when same-named objects exist across schemas. | Optional |
| Includes the tablespace of tables and indexes in a generated changesets if the value is | Optional * |
| Specifies the label filter to generate and apply to all changesets in your changelog. Useful to set many labels quickly. Similar to the set-labels command. Available in Liquibase 4.24.0 and later. Labels are tags you can add to changesets to control which changeset will be executed in any migration run. After generating changesets with labels, to deploy specific changes according to these labels, you must run a command that specifies a label filter. For example, | Optional |
| Generates a separate changelog for each object. Valid values:
Default: | Optional |
| Lets you replace the schemas in the output changelog. This is a CSV list. The parameter size must match Example: | Optional |
| Determines whether | Optional |
| Password to connect to the target database. | Optional |
| Specify Change Types you want to target. Liquibase sets | Optional |
| Specify Change Types you want to target. Liquibase sets | Optional |
| Specifies database schemas you want to include | Optional |
| When Supported for: Oracle, Postgres, SQL Server, MySQL, MariaDB, DB2, Snowflake, Databricks, MongoDB, and BigQuery. | Optional |
| Username to connect to the target database. | Optional |
Global parameters
Attribute | Definition | Requirement |
| When | Optional |
| Comma-separated list of Example: Uses prefix matching: โข With a trailing dot (e.g., โข Without a trailing dot (e.g., Ignored if | Optional |
| When Use this to prevent false positive drift detection caused by system-managed If both this parameter and Default: | Optional |
| Your Liquibase Secure license key | Required |
| Liquibase Secure 5.1.0+. Oracle only. Sets the maximum number of rows Liquibase loads into memory from a single query while it inspects your database. If a query returns more rows, the command fails with an error. Set it to | Optional |
Command parameters
Attribute | Definition | Requirement |
| The JDBC database connection URL. | Required |
| Specifies the author for changesets in the generated changelog. | Optional |
| Changelog file to write results | Optional |
| Specifies the context filter to generate and apply to all changesets in your changelog. Useful to set many contexts quickly. Similar to the set-contexts command. Available in Liquibase 4.24.0 and later. Contexts are tags you can add to changesets to control which changesets will be executed in any particular migration run. After generating changesets with contexts, to deploy specific changes according to these contexts, you must run a command that specifies a context filter. For example, | Optional |
| Specifies a directory to send the loadData output to a CSV file which is generated by running the | Optional |
| Name of the default catalog to use for the database connection | Optional |
| Name of the default schema to use for the database connection. If Note: In the properties file and Note: In Liquibase 4.12.0 and later, you can use mixed-case schema names if you set | Optional |
| Specifies the types of objects to compare. Specify multiple values as a comma-separated list (without spaces). Valid values are: If null, default types are Liquibase Secure 5.1.0+. Snowflake accepted values are: Note: For Snowflake, unique constraints are not snapshotted as standalone objects. Instead, uniqueness is captured as the Snowflake view and table support has been enhanced with four Snowflake- Note: The diff types | Optional |
| The JDBC driver class | Optional |
| The JDBC driver properties file | Optional |
| Objects to exclude from diff | Optional |
| Controls behavior when snapshots reference objects from schemas not included in the snapshot (like cross-schema triggers or foreign keys)
Default: | Optional |
| If | Optional |
| Objects to include in diff | Optional |
| If When specifying multiple schemas see Diff multiple schemas in Liquibase for file path considerations when same-named objects exist across schemas. | Optional |
| Includes the tablespace of tables and indexes in a generated changesets if the value is | Optional * |
| Specifies the label filter to generate and apply to all changesets in your changelog. Useful to set many labels quickly. Similar to the set-labels command. Available in Liquibase 4.24.0 and later. Labels are tags you can add to changesets to control which changeset will be executed in any migration run. After generating changesets with labels, to deploy specific changes according to these labels, you must run a command that specifies a label filter. For example, | Optional |
| Generates a separate changelog for each object. Valid values:
Default: | Optional |
| Lets you replace the schemas in the output changelog. This is a CSV list. The parameter size must match Example: | Optional |
| Determines whether | Optional |
| Password to connect to the target database. | Optional |
| Specify Change Types you want to target. Liquibase sets | Optional |
| Specify Change Types you want to target. Liquibase sets | Optional |
| Specifies database schemas you want to include | Optional |
| When Supported for: Oracle, Postgres, SQL Server, MySQL, MariaDB, DB2, Snowflake, Databricks, MongoDB, and BigQuery. | Optional |
| Username to connect to the target database. | Optional |
Global parameters
Attribute | Definition | Requirement |
| When | Optional |
| Comma-separated list of Example: Uses prefix matching: โข With a trailing dot (e.g., โข Without a trailing dot (e.g., Ignored if | Optional |
| When Use this to prevent false positive drift detection caused by system-managed If both this parameter and Default: | Optional |
| Your Liquibase Secure license key | Required |
| Liquibase Secure 5.1.0+. Oracle only. Sets the maximum number of rows Liquibase loads into memory from a single query while it inspects your database. If a query returns more rows, the command fails with an error. Set it to | Optional |
Command parameters
Attribute | Definition | Requirement |
| The JDBC database connection URL. | Required |
| Specifies the author for changesets in the generated changelog. | Optional |
| Changelog file to write results | Optional |
| Specifies the context filter to generate and apply to all changesets in your changelog. Useful to set many contexts quickly. Similar to the set-contexts command. Available in Liquibase 4.24.0 and later. Contexts are tags you can add to changesets to control which changesets will be executed in any particular migration run. After generating changesets with contexts, to deploy specific changes according to these contexts, you must run a command that specifies a context filter. For example, | Optional |
| Specifies a directory to send the loadData output to a CSV file which is generated by running the | Optional |
| Name of the default catalog to use for the database connection | Optional |
| Name of the default schema to use for the database connection. If Note: In the properties file and Note: In Liquibase 4.12.0 and later, you can use mixed-case schema names if you set | Optional |
| Specifies the types of objects to compare. Specify multiple values as a comma-separated list (without spaces). Valid values are: If null, default types are Liquibase Secure 5.1.0+. Snowflake accepted values are: Snowflake view and table support has been enhanced with four Snowflake- Note: The diff types | Optional |
| The JDBC driver class | Optional |
| The JDBC driver properties file | Optional |
| Objects to exclude from diff | Optional |
| Controls behavior when snapshots reference objects from schemas not included in the snapshot (like cross-schema triggers or foreign keys)
Default: | Optional |
| If | Optional |
| Objects to include in diff | Optional |
| If When specifying multiple schemas see Diff multiple schemas in Liquibase for file path considerations when same-named objects exist across schemas. | Optional |
| Includes the tablespace of tables and indexes in a generated changesets if the value is | Optional * |
| Specifies the label filter to generate and apply to all changesets in your changelog. Useful to set many labels quickly. Similar to the set-labels command. Available in Liquibase 4.24.0 and later. Labels are tags you can add to changesets to control which changeset will be executed in any migration run. After generating changesets with labels, to deploy specific changes according to these labels, you must run a command that specifies a label filter. For example, | Optional |
| Generates a separate changelog for each object. Valid values:
Default: | Optional |
| Lets you replace the schemas in the output changelog. This is a CSV list. The parameter size must match Example: | Optional |
| Determines whether | Optional |
| Password to connect to the target database. | Optional |
| Specify Change Types you want to target. Liquibase sets | Optional |
| Specify Change Types you want to target. Liquibase sets | Optional |
| Specifies database schemas you want to include | Optional |
| When Supported for: Oracle, Postgres, SQL Server, MySQL, MariaDB, DB2, Snowflake, Databricks, MongoDB, and BigQuery. | Optional |
| Username to connect to the target database. | Optional |
Global parameters
Attribute | Definition | Requirement |
| When | Optional |
| Comma-separated list of Example: Uses prefix matching: โข With a trailing dot (e.g., โข Without a trailing dot (e.g., Ignored if | Optional |
| When Use this to prevent false positive drift detection caused by system-managed If both this parameter and Default: | Optional |
| Your Liquibase Secure license key | Required |
| Liquibase Secure 5.1.0+. Oracle only. Sets the maximum number of rows Liquibase loads into memory from a single query while it inspects your database. If a query returns more rows, the command fails with an error. Set it to | Optional |
Command parameters
Attribute | Definition | Requirement |
| The JDBC database connection URL. | Required |
| Specifies the author for changesets in the generated changelog. | Optional |
| Changelog file to write results | Optional |
| Specifies the context filter to generate and apply to all changesets in your changelog. Useful to set many contexts quickly. Similar to the set-contexts command. Available in Liquibase 4.24.0 and later. Contexts are tags you can add to changesets to control which changesets will be executed in any particular migration run. After generating changesets with contexts, to deploy specific changes according to these contexts, you must run a command that specifies a context filter. For example, | Optional |
| Specifies a directory to send the loadData output to a CSV file which is generated by running the | Optional |
| Name of the default catalog to use for the database connection | Optional |
| Name of the default schema to use for the database connection. If Note: In the properties file and Note: In Liquibase 4.12.0 and later, you can use mixed-case schema names if you set | Optional |
| Specifies the types of objects to compare. Specify multiple values as a comma-separated list (without spaces). Valid values are: If null, default types are Liquibase Secure 5.1.0+. Snowflake accepted values are: Snowflake view and table support has been enhanced with four Snowflake- Note: The diff types | Optional |
| The JDBC driver class | Optional |
| The JDBC driver properties file | Optional |
| Objects to exclude from diff | Optional |
Unix
| Controls behavior when snapshots reference objects from schemas not included in the snapshot (like cross-schema triggers or foreign keys)
Default: | Optional |
| If | Optional |
| Objects to include in diff | Optional |
| If When specifying multiple schemas see Diff multiple schemas in Liquibase for file path considerations when same-named objects exist across schemas. | Optional |
| Includes the tablespace of tables and indexes in a generated changesets if the value is | Optional * |
| Specifies the label filter to generate and apply to all changesets in your changelog. Useful to set many labels quickly. Similar to the set-labels command. Available in Liquibase 4.24.0 and later. Labels are tags you can add to changesets to control which changeset will be executed in any migration run. After generating changesets with labels, to deploy specific changes according to these labels, you must run a command that specifies a label filter. For example, | Optional |
| Generates a separate changelog for each object. Valid values:
Default: | Optional |
| Lets you replace the schemas in the output changelog. This is a CSV list. The parameter size must match Example: | Optional |
| Determines whether | Optional |
| Password to connect to the target database. | Optional |
| Specify Change Types you want to target. Liquibase sets | Optional |
| Specify Change Types you want to target. Liquibase sets | Optional |
| Specifies database schemas you want to include | Optional |
| When Supported for: Oracle, Postgres, SQL Server, MySQL, MariaDB, DB2, Snowflake, Databricks, MongoDB, and BigQuery. | Optional |
Unix:
Windows:
| Liquibase Secure 5.1+
This is a JVM system property that controls how the Oracle JDBC driver handles fetch sizes when querying tables containing LONG or LONG RAW columns. It is available in Liquibase 5.1.0 and later. The default value is You might want to set this property to | Optional |
| Username to connect to the target database. | Optional |
Global parameters
Attribute | Definition | Requirement |
| When | Optional |
| Comma-separated list of Example: Uses prefix matching: โข With a trailing dot (e.g., โข Without a trailing dot (e.g., Ignored if | Optional |
| When Use this to prevent false positive drift detection caused by system-managed If both this parameter and Default: | Optional |
| Your Liquibase Secure license key | Required |
| Liquibase Secure 5.1.0+. Oracle only. Sets the maximum number of rows Liquibase loads into memory from a single query while it inspects your database. If a query returns more rows, the command fails with an error. Set it to | Optional |
Command parameters
Attribute | Definition | Requirement |
| The JDBC database connection URL. | Required |
| Specifies the author for changesets in the generated changelog. | Optional |
| Changelog file to write results | Optional |
| Specifies the context filter to generate and apply to all changesets in your changelog. Useful to set many contexts quickly. Similar to the set-contexts command. Available in Liquibase 4.24.0 and later. Contexts are tags you can add to changesets to control which changesets will be executed in any particular migration run. After generating changesets with contexts, to deploy specific changes according to these contexts, you must run a command that specifies a context filter. For example, | Optional |
| Specifies a directory to send the loadData output to a CSV file which is generated by running the | Optional |
| Name of the default catalog to use for the database connection | Optional |
| Name of the default schema to use for the database connection. If Note: In the properties file and Note: In Liquibase 4.12.0 and later, you can use mixed-case schema names if you set | Optional |
| Specifies the types of objects to compare. Specify multiple values as a comma-separated list (without spaces). Valid values are: If null, default types are Liquibase Secure 5.1.0+. Snowflake accepted values are: Snowflake view and table support has been enhanced with four Snowflake- Note: The diff types | Optional |
| The JDBC driver class | Optional |
| The JDBC driver properties file | Optional |
| Objects to exclude from diff | Optional |
| Controls behavior when snapshots reference objects from schemas not included in the snapshot (like cross-schema triggers or foreign keys)
Default: | Optional |
| If | Optional |
| Objects to include in diff | Optional |
| If When specifying multiple schemas see Diff multiple schemas in Liquibase for file path considerations when same-named objects exist across schemas. | Optional |
| Includes the tablespace of tables and indexes in a generated changesets if the value is | Optional * |
| Specifies the label filter to generate and apply to all changesets in your changelog. Useful to set many labels quickly. Similar to the set-labels command. Available in Liquibase 4.24.0 and later. Labels are tags you can add to changesets to control which changeset will be executed in any migration run. After generating changesets with labels, to deploy specific changes according to these labels, you must run a command that specifies a label filter. For example, | Optional |
| Generates a separate changelog for each object. Valid values:
Default: | Optional |
| Lets you replace the schemas in the output changelog. This is a CSV list. The parameter size must match Example: | Optional |
| Determines whether | Optional |
| Password to connect to the target database. | Optional |
| Specify Change Types you want to target. Liquibase sets | Optional |
| Specify Change Types you want to target. Liquibase sets | Optional |
| Specifies database schemas you want to include | Optional |
| When Supported for: Oracle, Postgres, SQL Server, MySQL, MariaDB, DB2, Snowflake, Databricks, MongoDB, and BigQuery. | Optional |
| Username to connect to the target database. | Optional |
The generate-changelog command supports formatted SQL output. You can specify a changelog filename in the format changelog.<database short name>.sql, and Liquibase infers the target database from the short name embedded in the filename. The short name segment is optional. If you omit it, for example changelog.sql, Liquibase infers the target database from your connection instead. In Liquibase Secure 5.2 and earlier, omitting the segment works only when you are connected to PostgreSQL.
Database short names
Database | Short name | Example filename |
Oracle | oracle | changelog. |
MySQL | mysql | changelog. |
MariaDB | mariadb | changelog. |
PostgreSQL | postgresql | changelog. |
SQL Server | mssql | changelog. |
DB2 (LUW) | db2 | changelog. |
DB2 (z/OS) | db2z | changelog. |
H2 | h2 | changelog. |
HSQLDB | hsqldb | changelog. |
SQLite | sqlite | changelog. |
Derby | derby | changelog. |
Firebird | firebird | changelog. |
Informix | informix | changelog. |
Ingres | ingres | changelog. |
Sybase | sybase | changelog. |
Sybase ASA (SQL Anywhere) | asany | changelog. |
CockroachDB | cockroachdb | changelog. |
EnterpriseDB | edb | changelog. |
Snowflake | snowflake | changelog. |
Databricks | databricks | changelog. |
BigQuery | bigquery | changelog. |
Cassandra | cassandra | changelog. |
Database objects supported by Liquibase
You can use the following object types in Liquibase:
Object type |
syntax | Liquibase edition |
Catalog |
| Liquibase Open Source |
Column |
| Liquibase Open Source |
Data |
| Liquibase Open Source |
Foreign key |
| Liquibase Open Source |
Index |
| Liquibase Open Source |
NOT NULL constraint | N/A | Liquibase Open Source |
Primary key |
| Liquibase Open Source |
Schema | N/A | Liquibase Open Source |
Sequence |
| Liquibase Open Source |
Table |
| Liquibase Open Source |
Unique constraint |
| Liquibase Open Source |
View |
| Liquibase Open Source |
Check constraint |
| Liquibase Secure |
Composite type |
| Liquibase Secure |
Function |
| Liquibase Secure |
Package |
| Liquibase Secure |
Package body |
| Liquibase Secure |
Stored procedure |
| Liquibase Secure |
Trigger |
| Liquibase Secure |
Liquibase Secure stored logic behavior
While Liquibase Open Source stores all changesets in a changelog, Liquibase Secure creates a directory called Objects and places the directory at the same level as your changelog.
The Objects directory contains subdirectories for each of the stored logic types:
packagepackagebodyfunctionstored proceduretrigger
Note: Some database platforms may not support all of these stored logic types.
The generate-changelog command will not create the Objects directory if:
You don't have a valid Liquibase Secure license key.
Stored logic is not present in the database.
The target database does not support the
generate-changelogcommand and stored logic objects.The changelog file is written in formatted SQL. The
Objectsfolder can only be created when generating XML, JSON, or YAML changelogs.There is a pre-existing directory called
Objectsthat was created outside Liquibase.
If your database contains Stored Logic objects, you may have issues attempting to run the generate-changelog command more than once, even with a new changelog name, because the stored logic files already exist in the Objects directory.
To generate a newer version of the changelog file with stored logic objects based on the current database state, you need to delete, rename, or move the Objects directory that was created by running the generate-changelog command previously. Then, you can run the generate-changelog command again.
Note: If there is a pre-existing Objects directory that is not related to Liquibase, you need to delete, rename, or move it to run the generate-changelog command.
If you want to track the history of stored logic objects, use the diff-changelog command. The diff-changelog command structures stored logic files into timestamped directories every time you run the command.
Note: For JVM heap and RAM sizing guidance when running this command against large schemas, see Size JVM heap and RAM for diff-class commands.