I would humbly suggest that Liquibase is the wrong tool for the job. I
see Liquibase's single responsibility as 'manage database schema
changes' and loading data is not a part of that responsibility. If
you are using it to load test data, that seems like a reasonable use,
maybe, but in that case your tests should not be tightly coupled to
implementation details like what the id is for a raw that was inserted.
If you are using Liquibase to load 'constant' data (i.e. US
States table that is used for many address-type tables) then that should
be OK too - just hard-code the IDs and ensure that every instance of the
database has the same ones.
↧