Reputation: 83
We are developing an application which uses multiple schemas to manage database objects. I cannot see anyway of doing this with Liquibase. I had to drop schemas manually and create them.
dropAll gradle task only drops objects in public schema. Any help would be great.
Thanks for your time.
Upvotes: 2
Views: 4320
Reputation: 15763
Liquibase can handle objects within multiple schemas and can also manage creating additional schemas as well.
When you connect to the database, Liquibase will create a DATABASECHANGELOG table in the default schema and that schema needs to exist. That table tracks which changeSets have executed, and anything that can be done through SQL can be done within your changeSets.
There are built-in tags for things like createTable, addColumn etc which will make changes in the default schema, but they all have tags such as tableSchemaName that can be used to target the object to a different schema.
If you want to make changes for which there are not built-in tags, you can always use the "sql" tag and specify whatever sql you want, such as create database additional_info
Upvotes: 2