I’m using Liquibase 4.8 because later versions have broken needed functionality.
I’m finding a couple of issues related to sequences when running
generatechangelog against an oracle schema, requiring extensive edits before running the generated changelog to create a new schema.
startValueis being set to the current value in the source schema. In most cases, when we build a new schema, we want this to be either the
- If the sequence includes the cycle option, then the
maxValuemust be specified for the command to run without error, however, the
maxValueis missing from some (but not all) generated sequence changesets that have the
CYCLEattribute, requiring these be edited to add the
-- changeset bigpet01-pa:1663277030155-8 CREATE SEQUENCE DATAFEED_ID_SEQ START WITH 523194 CYCLE; -- changeset bigpet01-pa:1663277030155-9 CREATE SEQUENCE ETQ_SID_SEQ START WITH 15498321 MAXVALUE 9999999999999999999999999999 CYCLE;
When running a diff report where reference is set to the source schema where
generatechangelog was run, against a new schema build from the generated changelog, I get differences for every sequence related to having to modify these values. E.g.
Changed Sequence(s): APP_ERR_LOG_ID_SEQ maxValue changed from 'null' to '9999999999999999999999999999' startValue changed from '8141319' to '1'
In addition, the diff-changelog command wants to alter every sequence but provides no changes. E.g.
-- liquibase formatted sql -- changeset bigpet01-pa:1663616629511-1 ALTER SEQUENCE AD2_SID_SEQ; -- changeset bigpet01-pa:1663616629511-2 ALTER SEQUENCE APPS_CAP_ID_SEQ; -- changeset bigpet01-pa:1663616629511-3 ALTER SEQUENCE APP_ERR_LOG_ID_SEQ;
Is there a way to avoid such issues without having to write a bunch of post-processing code?