myt/exporters/event.ejs

9 lines
320 B
Plaintext
Executable File

DROP EVENT IF EXISTS `<%- schema %>`.`<%- name %>`;
DELIMITER $$
CREATE DEFINER=`root`@`%` EVENT `<%- schema %>`.`<%- name %>`
ON SCHEDULE EVERY <%- intervalValue %> <%- intervalField %>
ON COMPLETION <%- onCompletion %>
<% if (status == 'ENABLED') { %>ENABLE<% } else { %>DISABLE<% } %>
DO <%- body %>$$
DELIMITER ;