9.12.16 generate-changelog
Writes changelog XML to copy the current state of the database to standard
output or a file (uses core Liquibase functionality).
Syntax
Liquibase|lb generate-changelog|gec {OPTIONS}
Options
Option | Description | Default |
---|---|---|
-data-output-directory|-daod |
Directory to write data to. | - |
-database-changelog-table-name|-dactn |
Name of table to use for tracking change history. | - |
-debug|-de |
Enable debug output. | - |
-default-schema-name|-desn |
The default schema name to use for the database connection. | - |
-diff-types|-dit |
Types of objects to compare | catalogs, tables, views, columns, indexes, foreignkeys, primarykeys, uniqueconstraints, data, storedprocedures, sequences{catalogs| tables| views| columns| indexes| foreignkeys| primarykeys| uniqueconstraints| data| storedprocedures| sequences} |
-exclude-objects|-exo |
Objects to exclude from diff | - |
-include-objects|-ino |
Objects to include in diff | - |
-include-schema|-ins |
If true, the schema is included in generated changeSets. | False |
-include-tablespace|-int |
Include the tablespace attribute in the changelog | False |
-liquibase-schema-name|-lbsn |
Schema to use for Liquibase objects. | - |
-liquibase-tablespace-name|-lbtn |
Tablespace to use for Liquibase objects. | - |
-log|-lo |
Enable logging. Standard logging is Debug logging is |
- |
-output-default-schema|-ouds |
Control whether names of objects in the default schema are fully qualified or not. If true they are qualified. If false, only objects outside the default schema are fully qualified. | False |
-output-file|-ouf
<output-file> |
The name of the file to write the output to. | - |
-overwrite-files|-ovf |
Overwrite any existing files in the directory. This will not affect other files. | - |
-defaults-file|-def |
Fully qualified path to the properties file you want
to use. Example:
-defaults-file/tmp/liquibase.properties |
- |
-schemas|-sc |
Schemas to include in diff | - |
-search-path|-sep |
Complete list of locations to search for files such as changelog files. You can specify multiple paths by separating them with commas. |
- |
-secure-parsing|cp |
If true, remove functionality from file parsers that could be used insecurely. An example is disabling remote XML entity support. |
True |
Examples
Generate XML files for a database.
-- Set default output path
SQL> cd <output-files-path>
-- Generate xml files
SQL> lb generate-changelog
Generate XML files for specific schemas in a
database.
SQL> lb generate-changelog -schemas hr,sales