Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Use Liquidbase to create objects in empty database

$
0
0
Hi,

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 <preconditions> 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,
Zbynek


Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>