The dropAll command of the liquibase maven plugin has an property where you could insert more than one schema to act on.
The update command has a property to drop the database content before the changesets will be executed. Unfortunately the update command does not honour the property so only the default schema content will be dropped. Is there a way to specify more than one schema so that update will drop the content of multiple schemas?
If not, I would like to suggest that update should honour the property as well.
The dropAll ... has an property do you mean the
The reason that doesn’t apply to
update is because update can make changes in any schemas no matter what flag is passed, but you do need to specify the schemas to apply the SQL to. We have a
defaultSchemaName property which sets the default schema for SQL that doesn’t specify the schema to use, and that
defaultSchemaName property is also respected in
dropAll as the default schema as well. But I don’t think
schemas makes sense for update like it does for dropAll.
Or, am I misunderstanding the question?
I’am talking about optional Maven configuration attributes.
And yes, I understand that an update can apply to many schemas. The problem is to drop first all tables etc from a schema before we apply the update. For this reason (I assume) there is a liquibase.dropFirst attribute (see maven update command but this flag only works on the default schema which is ok for the default case. In our case we have more than one schema and the update works on these schemas. In order to have a fresh start we use now first a drop-all and then the update command. The drop-all command can be used because there is an additional attribute “schemas” available.
The question is: Why do not have a “schemas” attribute for the update command which will only define the schemas if dropFirst is true and only for that dropping before the update takes place.