liquibase status: Pending Changesets in CI
liquibase status reports how many changesets in the changelog have not yet run against the target database.
status is the read-only preview of update. Run it to see what a deploy would change, or to gate a pipeline on there being (or not being) pending work.
What it does
liquibase status counts and, with --verbose, lists the changesets that have not been applied. It reads DATABASECHANGELOG and the changelog but makes no changes to the schema.
Common usage
liquibase \
--changelog-file=db/changelog.xml \
--url=jdbc:postgresql://db:5432/app \
--username=ci --password="$DB_PASSWORD" \
status --verboseOptions
| Flag | What it does |
|---|---|
| --verbose | List each pending changeset, not just the count |
| --changelog-file=<path> | Changelog to compare against |
| --contexts / --labels | Restrict which changesets are considered |
| --url / --username / --password | Connection details |
In CI
status --verbose output is human-oriented; parse it in a pre-deploy job to warn on unexpected pending changesets. It touches nothing, so it is safe in read-only stages. Related commands liquibase updateSQL and liquibase validate give more machine-friendly checks.
Common errors in CI
"Unexpected error running Liquibase: ... Connection could not be created" means bad url or credentials or an unreachable database. "changelog-file ... does not exist" means the path is wrong relative to the CI working directory. status never locks the database, so lock errors here point at a stuck run of a different command.