In fact, the Ant sql task will let you specify the block delimiter, but this doesn’t solve my underlying problem.
Change logs can be executed (in the case of Oracle) in 4 ways that are relevant to me:
- asking Liquibase to apply the changes directly (i.e. no outputfile)
- asking Liquibase to generate a the script file, then
In our environment, we definitely need to be able to generate scripts that can be reviewed by our DBA. I think that is a common scenario. However, generating scripts that will run successfully and reliably in all three cases listed above (Ant Task, SQL*Plus, SQLDeveloper) is tricky. In fact, I’ve not been able to successfully achieve even one of those.
The root of the problem is the handling of triggers, procedures, and other “blocks” vs. handling of “statements”. I think I understand correctly that blocks require a delimiter (by default, “/” on a line by itself) after the end of the block.
I will build my own subclass to accomplish what’s needed (if I can identify a comprehensive solution), but I’m really surprised that no one has already addressed this. Perhaps I overestimate the intersection of Liquibase users and Oracle users.