0
votes

I am using liquibase-hibernate ext. I am able to generate the difference between a hbm file and my schema. But I am not able to generate the <precondition> tag. I am not talking about custom precondition, I need to have the built in precondition tag such as table exists etc. In liquibase doc, now where it is written how do we generate this while running liquibase -diff or generateChangeLog.

Is there a way to register these tags before generating the changelog files?

1

1 Answers

1
votes

This is not something that Liquibase supports. If you have an existing database that you want to start managing with Liquibase, you can start by running liquibase with the generateChangeLog command as you mentioned. This creates a new changelog that has everything you want in it. You may want to examine that changelog and make manual changes before using it. Once you have it in a state you like, you run liquibase with the changelogsync command to create the DATABASECHANGELOG table and entries that let liquibase know that everything described in the changelog has already been deployed to that database instance.

Typically you do not need a lot of precondition tags.