.Dd $Mdocdate: March 18 2016 $ .Dt LIQUIBASE 1 .Os .Sh NAME .Nm liquibase .Nd A tool to manage sql database schemas via config files .\" .Sh LIBRARY .\" For sections 2, 3, and 9 only. .\" Not used in OpenBSD. .Sh SYNOPSIS .Nm liquibase .Op [options] [command] .Sh DESCRIPTION .Nm is a cross-platform, cross-database, command-line tool, written in Java, that is designed to allow developers to develop changesets that migrate a SQL database's schema from one version to the next. This tool allows all of the changes to an application's database to be stored in a version control system and allows database schemas to be migrated from a current state to a desired future state. Standard Commands: update Updates database to current version updateSQL Writes SQL to update database to current version to STDOUT updateCount Applies next NUM changes to the database updateCountSQL Writes SQL to apply next NUM changes to the database updateToTag Updates the database to the changeSet with the specified tag updateToTagSQL Writes (to standard out) the SQL to update to the changeSet with the specified tag rollback Rolls back the database to the the state it was when the tag was applied rollbackSQL Writes SQL to roll back the database to that state it was in when the tag was applied to STDOUT rollbackToDate Rolls back the database to the the state it was at the given date/time. Date Format: yyyy-MM-dd'T'HH:mm:ss rollbackToDateSQL Writes SQL to roll back the database to that state it was in at the given date/time version to STDOUT rollbackCount Rolls back the last change sets applied to the database rollbackCountSQL Writes SQL to roll back the last change sets to STDOUT applied to the database futureRollbackSQL Writes SQL to roll back the database to the current state after the changes in the changeslog have been applied futureRollbackSQL Writes SQL to roll back the database to the current state after changes in the changeslog have been applied futureRollbackFromTagSQL Writes (to standard out) the SQL to roll back the database to its current state after the changes up to the specified tag have been applied updateTestingRollback Updates database, then rolls back changes before updating again. Useful for testing rollback support generateChangeLog Writes Change Log XML to copy the current state of the database to standard out snapshot Writes the current state of the database to standard out snapshotReference Writes the current state of the referenceUrl database to standard out Diff Commands diff [diff parameters] Writes description of differences to standard out diffChangeLog [diff parameters] Writes Change Log XML to update the database to the reference database to standard out Documentation Commands dbDoc Generates Javadoc-like documentation based on current database and change log Maintenance Commands tag 'Tags' the current database state for future rollback tagExists Checks whether the given tag is already existing status [--verbose] Outputs count (list if --verbose) of unrun changesets unexpectedChangeSets [--verbose] Outputs count (list if --verbose) of changesets run in the database that do not exist in the changelog. validate Checks changelog for errors calculateCheckSum Calculates and prints a checksum for the changeset with the given id in the format filepath::id::author. clearCheckSums Removes all saved checksums from database log. Useful for 'MD5Sum Check Failed' errors changelogSync Mark all changes as executed in the database changelogSyncSQL Writes SQL to mark all changes as executed in the database to STDOUT markNextChangeSetRan Mark the next change changes as executed in the database markNextChangeSetRanSQL Writes SQL to mark the next change as executed in the database to STDOUT listLocks Lists who currently has locks on the database changelog releaseLocks Releases all locks on the database changelog dropAll Drop all database objects owned by user Required Parameters: --changeLogFile= Migration file --username= Database username --password= Database password. If values is PROMPT, Liquibase will prompt for a password --url= Database URL Optional Parameters: --classpath= Classpath containing migration files and JDBC Driver --driver= Database driver class name --databaseClass= custom liquibase.database.Database implementation to use --propertyProviderClass= custom Properties implementation to use --defaultSchemaName= Default database schema to use --contexts= ChangeSet contexts to execute --labels= Expression defining labeled ChangeSet to execute --defaultsFile= File with default option values (default: ./liquibase.properties) --delimiter= Used with executeSql command to set the string used to break up files that consist of multiple statements. --driverPropertiesFile= File with custom properties to be set on the JDBC connection to be created --liquibaseCatalogName= The name of the catalog with the liquibase tables --liquibaseSchemaName= The name of the schema with the liquibase tables --databaseChangeLogTableName= The name of the Liquibase ChangeLog table (default: DATABASECHANGELOG) --databaseChangeLogLockTableName= The name of the Liquibase ChangeLog Lock table (default: DATABASECHANGELOGLOCK) --liquibaseSchemaName= The name of the schema with the liquibase tables --includeSystemClasspath= Include the system classpath in the Liquibase classpath (default: true) --promptForNonLocalDatabase= Prompt if non-localhost databases (default: false) --logLevel= Execution log level (debug, info, warning, severe, off) --logFile= Log file --currentDateTimeFunction= Overrides current date time function used in SQL. Useful for unsupported databases --outputDefaultSchema= If true, SQL object references include the schema name, even if it is the default schema. Defaults to true --outputDefaultCatalog= If true, SQL object references include the catalog name, even if it is the default catalog. Defaults to true --outputFile= File to write output to for commands that write output, e.g. updateSQL. If not specified, writes to sysout. --help Prints this message --version Prints this version information Required Diff Parameters: --referenceUsername= Reference Database username --referencePassword= Reference Database password. If value is PROMPT, Liquibase will prompt for a password --referenceUrl= Reference Database URL Optional Diff Parameters: --defaultCatalogName= Default database catalog to use --defaultSchemaName= Default database schema to use --referenceDefaultCatalogName= Reference database catalog to use --referenceDefaultSchemaName= Reference database schema to use --schemas= Database schemas to include objects from in comparison --includeCatalog= If true, the catalog will be included in generated changeSets Defaults to false --includeSchema= If true, the schema will be included in generated changeSets Defaults to false --referenceDriver= Reference database driver class name --dataOutputDirectory=DIR Output data as CSV in the given directory --diffTypes List of diff types to include in Change Log expressed as a comma separated list from: tables, views, columns, indexes, foreignkeys, primarykeys, uniqueconstraints data. If this is null then the default types will be: tables, views, columns, indexes, foreignkeys, primarykeys, uniqueconstraints. Change Log Properties: -D= Pass a name/value pair for substitution in the change log(s) Default value for parameters can be stored in a file called "liquibase.properties" that is read from the current working directory. Full documentation is available at http://www.liquibase.org/documentation/command_line.html .\" .Sh CONTEXT .\" For section 9 functions only. .\" .Sh IMPLEMENTATION NOTES .\" Not used in OpenBSD. .\" .Sh RETURN VALUES .\" For sections 2, 3, and 9 function return values only. .\" .Sh ENVIRONMENT .\" For sections 1, 6, 7, and 8 only. .\" .Sh FILES .\" .Sh EXIT STATUS .\" For sections 1, 6, and 8 only. .\" .Sh DIAGNOSTICS .\" For sections 1, 4, 6, 7, 8, and 9 printf/stderr messages only. .\" .Sh ERRORS .\" For sections 2, 3, 4, and 9 errno settings only. .\" .Sh SEE ALSO .\" .Xr foobar 1 .\" .Sh STANDARDS .\" .Sh HISTORY .\" .Sh CAVEATS .\" .Sh BUGS .\" .Sh SECURITY CONSIDERATIONS .\" Not used in OpenBSD.