Create Events with liquibase

827 Views Asked by At

I need to know how using liquibase I can define a sets of mysql events. for instance I have 4 files .sql that i will call from .yaml file, each of this files contain a definition like:

CREATE EVENT event_name_1 ON SCHEDULE EVERY 1 week STARTS '2012-01-01 00:00:00'
ON COMPLETION PRESERVE
DO
BEGIN
    Call call_partition();
END

CREATE EVENT event_name_2 ON SCHEDULE EVERY 1 week STARTS '2012-01-01 00:00:00'
ON COMPLETION PRESERVE
DO
BEGIN
    Call call_partition();
END
..
...
....

But once I check if the four event were create using: show events; just show me 1 event created not the 4.

Is there any tag define for create event like for procedure exist ?

(createProcedure)...
1

There are 1 best solutions below

1
On

I dont know how you apply the files, but i guess you use sqlFile. For procedural (what your event seems to be like) sql you may need to use the splitStatements attribute with false:

Set to false to not have liquibase split statements on ;'s and GO's. Defaults to true if not set