Skip to Main Content



For appeals, questions and feedback, please email

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?

Post Details
Added on Aug 3 2023