Some DB entities have dependencies. e.g a view / stored procedure depends on views / tables it uses. Is there a way to handle it with xml changelog?
In my scenario ViewB uses ViewA. To change ViewA steps required:
- ViewB needs to be dropped.
- ViewA needs to be changed
- ViewB needs to be recreated
I have the following changesets:
dropView should have an option 'ifExists' avoiding error if the view does not exists
dropView could have an option to drop all dependent objects. (The dependency can be retrieved from the DB.)Some way to call or ask another changeSet to be executed later. In that case if a dependent view (ViewA) has been changed. The changeset drops the depending view(s) (ViewB) and ask liquibase to execute the changesets recreating it. This feature could be used in many other cases. liquibase only needs to change the flag if a changeSet needs to be executed.Similar: changeSet could have a 'dependsOn' option listing the changesets it depends on. If the depended changeset was executed, execute this also even if not changedprecondition similar to changeSetExecuted (or just a option) to check if a changeSet was executed in the current execution.
Possibility to change the value of a property within a changeSet. (Opens enormous number of possibilities and flexibility)