Can we change order of multiple changeSets in an xml file in a version 2 release, if those changesets are independent (means different tables)?

I am a beginner using liquibase with Corda, Imagine we had 2 changeSets =>

table1_v1, table2_v1 in version 1 first release.

We introduced table1_v2 in version 2 release in between.

Now I suppose order would be table1_v1 → table1_v2 → table2_v1,

Will inserting it like this (between two change sets) become an issue at a later point (like if any dependency came into picture between tables in future or does checksum change in this scenario, since order is changed now?

I found a related scenario here: liquibase - execution order of changesets - Stack Overflow (we are also thinking of split xml’s based on tables from first release).

Basically my idea is also same for better readability by grouping changesets in each file based on table and then include those files into master xml.

table1_v1.xml -------->
                         table1.xml  ------------> 
table1_v2.xml -------->

                                                   master.xml
table2_v1.xml -------->
                         table2.xml  ------------> 
table2_v2.xml -------->

table1_v1, table1_v2 included as file inside table1.xml & table1.xml & table2.xml included as file inside master.xml

I need to know the drawback this have.

Changeset are executed in sequential order. Adding a new changeset between to existing changesets should cause no problem, but there is always the chance of a dependency problem if you were to deploy to a database that does not yet have any changeset deployed, and you have something in table1_v2 that depends on table2_v1.

1 Like

ok, means. to a new database, there is a risk with version 2. for older db migration, its fine, right