Skip to main content

ban-alter-sequence-values

problem​

Changes to standalone and identity sequence options can reissue identifiers or change the range of values that existing clients receive. This rule is opt-in. An unconditional CREATE earlier in the file suppresses a warning for that new object.

ALTER SEQUENCE ids RESTART WITH 1;

solution​

Coordinate sequence changes with clients that use generated values.

Enable this rule with --include ban-alter-sequence-values.