22 lines
486 B
Plaintext
Executable File
22 lines
486 B
Plaintext
Executable File
DROP EVENT IF EXISTS <%- schema %>.<%- name %>;
|
|
DELIMITER $$
|
|
CREATE DEFINER=<%- definer %> EVENT <%- schema %>.<%- name %><%
|
|
if (type == 'RECURRING') { %>
|
|
ON SCHEDULE EVERY <%- intervalValue %> <%- intervalField %><%
|
|
if (starts) { %>
|
|
STARTS <%- starts %><%
|
|
}
|
|
if (ends) { %>
|
|
ENDS <%- ends %><%
|
|
}
|
|
} else { %>
|
|
ON SCHEDULE AT <%- executeAt %><%
|
|
} %>
|
|
ON COMPLETION <%- onCompletion %>
|
|
<%- status %><%
|
|
if (comment) { %>
|
|
COMMENT <%- comment %><%
|
|
} %>
|
|
DO <%- body %>$$
|
|
DELIMITER ;
|