Hi Mark11,
1. The reason you don't need the "DELIMITER /" statement is because it is already defined as a changeSet attribute "endDelimiter: /"
Just run your SQL as:
CREATE DEFINER=`root`@`%` EVENT `dev_segment_budget_tracking_sum_updater`
ON SCHEDULE
EVERY 2 MINUTE STARTS '2019-05-27 13:48:28'
ON COMPLETION NOT PRESERVE
ENABLE
COMMENT 'DEV ONLY!'
DO BEGIN
update operations.segment_budget_tracking_sum set last_updated = now() where 1=1;
END/
ON SCHEDULE
EVERY 2 MINUTE STARTS '2019-05-27 13:48:28'
ON COMPLETION NOT PRESERVE
ENABLE
COMMENT 'DEV ONLY!'
DO BEGIN
update operations.segment_budget_tracking_sum set last_updated = now() where 1=1;
END/
And you should be fine.
2. You are right about the "$$" end delimiter behavior.
Liquibase is using regexp under the covers, and it is getting the "$" confused with an "end of string" symbol, so it needs to be escaped.
If you really want to set "$$" as the endDelimiter, you can put escape characters "\" before each "$". For example:
<changeSet author="SteveZ" id="external-sql-script-example" context="QA" labels="Jira1000">
<sqlFile dbms="mysql" splitStatements="true" endDelimiter="\$\$" stripComments="true" path="objects/function/CalcIncome.sql"/>
<rollback>DROP FUNCTION CalcIncome</rollback>
</changeSet>