myt/exporters/event.ejs

22 lines
486 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 (type == 'RECURRING') { %>
ON SCHEDULE EVERY <%- intervalValue %> <%- intervalField %><%
if (starts) { %>
STARTS <%- starts %><%
2022-02-07 14:43:12 +00:00
}
if (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 (comment) { %>
COMMENT <%- comment %><%
} %>
2020-11-14 01:38:56 +00:00
DO <%- body %>$$
DELIMITER ;