Liquibase Contexts/Labels Skipping Changesets in CI
Liquibase update succeeded but expected tables/columns are missing because the changesets were filtered out by contexts or labels. A changeset only runs when its context/label expression matches what you pass - a filtering/config issue, not a failure.
What this error means
liquibase update reports success yet downstream steps fail because objects are absent. The changelog runs but specific changesets are marked filtered/skipped due to context or label mismatch.
Skipping changeSet: db/changelog/003-prod-only.xml::seed::alice
because context "prod" does not match runtime context "test"
... Liquibase command 'update' was executed successfully (0 changesets applied)Common causes
Changeset context does not match runtime context
A changeset tagged context="prod" is skipped when CI runs with --contexts=test (or none). The update "succeeds" while applying nothing relevant.
Label expression excludes the changeset
A labels filter passed to update excludes changesets whose labels do not match, so they never run.
No contexts passed where changesets require them
Changesets that only run under a named context are skipped entirely when CI passes no context.
How to fix it
Pass the contexts/labels CI needs
Run update with the context and label expression that includes the changesets you expect to apply.
liquibase update --contexts=test,common --labels="!prod-only"Audit which changesets will run
- Use
liquibase status --verbose(with the same contexts/labels) to see pending vs skipped. - Confirm each required changeset’s
context/labelsmatches the CI invocation. - Avoid over-narrow contexts that exclude schema CI depends on.
How to prevent it
- Pass an explicit, reviewed
--contexts/--labelsset in CI. - Keep changeset context/label tags consistent with environments.
- Verify with
status --verbosethat expected changesets will apply.