liquibase formatted sql file containing multiline rollback statements to allow Oracle PL/SQL -
i using liquibase version 3.5.3, writing "formatted sql" files need execute pl/sql (to our oracle 11g database).
the changeset uses "enddelimiter:/" option allow this.
--liquibase formatted sql --changeset mike:51.9 enddelimiter:/ /* -- 'create/modify triggers fin_plans' -- */ begin hist_pkg.trig_hist_tab('fin_plans'); end; /
the rollback changeset needs execute pl/sql, despite numerous searches can not find way this. have tried specifying multiple rollback statements, each rollback line executed individually (as in "sql statements") , don't know how make recognise pl/sql "block".
i've tried enddelimitor option on rollback not recognised. i've tried assuming enddelimitor option changeset applies rollback, alas no.
what want ...
--liquibase formatted sql --changeset mike:51.9 enddelimiter:/ /* -- 'create/modify triggers fin_plans' -- */ begin hist_pkg.trig_hist_tab('fin_plans'); end; / --rollback enddelimiter:/ --rollback begin --rollback hist_pkg.trig_hist_tab('fin_plans'); --rollback end; --rollback /
my searches have turned http://forum.liquibase.org/topic/issue-with-pl-sql-and-rollbacks solution using "format xml" (not "format sql"). https://liquibase.jira.com/browse/core-1608 created has since been closed, points out can done "format xml".
so possible write liquibase rollbacks in "formated sql" files support calling pl/sql code?
a work colleague has found answer question. have set rollback end delimiter "in changeset header". doh!
--liquibase formatted sql --changeset mike:51.9 enddelimiter:/ rollbackenddelimiter:/ /* -- 'create/modify triggers fin_plans' -- */ begin hist_pkg.trig_hist_tab('fin_plans'); end; / --rollback begin --rollback hist_pkg.trig_hist_tab('fin_plans'); --rollback end; --rollback /
hope helps else struggling me.
Comments
Post a Comment