I used generateChangeLog command on an existing database. It helped me auto generating ‘create’ changesets for all tables, sequences.
I am interested to know if there is a way to doing same and get preconditions included using generateChangeLog. Say to include basic precondition like if table or sequence already exists.
I went through liquibase documentation but couldn’t find any help on this. Googled, but couldn’t find much relevant, useful help.
Can anyone let me know if this is possible ?
I can help myself if pointed out to any useful knowledge source too.
In general, you don’t need to have preconditions for things like ‘table exists’ before the change that creates a a table because liquibase will see that the change to create the table has already been applied, and won’t try to re-apply it.