Skip to Main Content

SQLcl

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

How to handle identity columns with Liquibase?

Roel HartmanAug 3 2023

When we make a change to a table, we currently regenerate the table definition xml file and apply that as an update to another environment. However, if we are using an identity column on a table as a primary key, the current "start with" value of the development environment is included in the xml file. E,g, <START_WITH>61</START_WITH> When we apply this to another environment, the sequence of the identity column is reset to that value. Obviously this will cause PK violation errors when there is data in that other environment (and it already has a "higher" value as current for that index). Is there a way to exclude that start_with clause from the XML? Or is there an other/better approach?

Comments
Post Details
Added on Aug 3 2023
5 comments
289 views