Liquibase Database change tracking
Light · Postcard
102 × 152 mm · PDF
Dark · Postcard
102 × 152 mm · PDF
Ink saver · Postcard
102 × 152 mm · PDF
Light · A4 landscape
297 × 210 mm · PDF
Dark · A4 landscape
297 × 210 mm · PDF
Ink saver · A4 landscape
297 × 210 mm · PDF
Light · A3 landscape
420 × 297 mm · PDF
Dark · A3 landscape
420 × 297 mm · PDF
Ink saver · A3 landscape
420 × 297 mm · PDF
Start here
liquibase init project
liquibase validate
liquibase status
liquibase update-sql
liquibase update
liquibase history
liquibase tag --tag=<name>
liquibase rollback --tag=<name>
Concepts
- Changelog changesets in a file
- Liquibase compares ids + checksums
- Database your schema
- DATABASECHANGELOG what already ran
Project and connection
liquibase --version
liquibase <command> --help
--url=<jdbc-url>
--username=<user> --password=<pw>
--changelog-file=<path>
--defaults-file=<file>
--log-level=<level>
Changelog formats
-- liquibase formatted sql
-- changeset <author>:<id>
-- rollback <sql>
<include file="<path>"/>
-- changeset <a>:<id> runOnChange:true
<tagDatabase tag="<name>"/>
Update
liquibase update
liquibase update-sql
liquibase update-count --count=<n>
liquibase update-testing-rollback
--context-filter=<ctx>
Rollback
liquibase rollback --tag=<name>
liquibase rollback-count --count=<n>
liquibase rollback-to-date --date=<date>
liquibase rollback-sql --tag=<name>
liquibase rollback-count-sql --count=<n>
Inspect and track
liquibase status
liquibase status --verbose
liquibase history
liquibase tag --tag=<name>
liquibase diff --reference-url=<url>
liquibase diff-changelog --reference-url=<url>
Generate and sync
liquibase generate-changelog
--changelog-file=<file>
--schemas=<a,b>
liquibase changelog-sync
Maintenance
liquibase validate
liquibase release-locks
liquibase clear-checksums
liquibase drop-all
Configuration
url: <jdbc-url>
changelogFile: <path>
Recipes
liquibase validateliquibase status --verboseliquibase update-sqlliquibase tag --tag=before-releaseliquibase update
liquibase rollback-sql --tag=before-releaseliquibase rollback --tag=before-release
liquibase generate-changelog --changelog-file=changelog.xmlliquibase changelog-syncliquibase status



