myt/exporters/event.ejs

22 lines
514 B
Plaintext
Raw Normal View History

DROP EVENT IF EXISTS <%- schema %>.<%- name %>;
2020-11-14 01:38:56 +00:00
DELIMITER $$
2022-02-07 14:43:12 +00:00
CREATE DEFINER=<%- definer %> EVENT <%- schema %>.<%- name %><%
if (locals.type == 'RECURRING') { %>
2022-02-07 14:43:12 +00:00
ON SCHEDULE EVERY <%- intervalValue %> <%- intervalField %><%
if (locals.starts) { %>
STARTS <%- starts %><%
2022-02-07 14:43:12 +00:00
}
if (locals.ends) { %>
ENDS <%- ends %><%
2022-02-07 14:43:12 +00:00
}
} else { %>
ON SCHEDULE AT <%- executeAt %><%
} %>
2020-11-14 01:38:56 +00:00
ON COMPLETION <%- onCompletion %>
2022-02-07 14:43:12 +00:00
<%- status %><%
if (locals.comment) { %>
2022-02-07 14:43:12 +00:00
COMMENT <%- comment %><%
} %>
2020-11-14 01:38:56 +00:00
DO <%- body %>$$
DELIMITER ;