I am trying to use Liquibase to create objects in empty database.
Since we have quite a lot of objects I decided to split them into separate XML files based on
purpose of objects (security.xml, services.xml, datasources.xml etc).
My idea is that during the development the changes will always be written into appropriate XML file.
In each of these files I have changesets to create tables, add PK, add FK - the usual I think.
Now, when first XML starts to be executed, it will create tables and tries to add FK to tables that has not
been created yet, because they reside in another XML that has not been processed yet.
Is there any way how to solve this and still keep my setup ?
My idea would be to use to execute changeset that would create missing table before adding the FK.
Or maybe there is a way how to specify that one changeset has predecessors ?
Im really new to Liquibase and maybe I do it completely wrong
Thanks for any suggestions,
Since I havent got any reponses, I have dealt with this situation by using two different files
security-create.xml & security-update.xml (and many others in this manner).
The '-create' guy contains only SQL CREATE and '-update' contains all PK, FK, INDEXES etc.
Just making sure the ALL '-create' files are executed before any '-update' using
and putting them into different folders.
Just in case anyone could make use of this...