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