salix/db/routines/vn/triggers/zoneIncluded_beforeInsert.sql

16 lines
467 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneIncluded_beforeInsert`
BEFORE INSERT ON `zoneIncluded`
BEGIN
SET NEW.editorFk = account.myUser_getId();
-- Activo el evento 'zone_getCollisions'
-- Insert en vn_schedulesla key 'zone_getCollisions'
-- ALTER EVENT zoneCollisions ENABLE;
INSERT IGNORE INTO `util`.`vn_schedules`(`schema`, `procedure`)
VALUES
(`vn`, `zone_getCollisions`);
END$$
DELIMITER ;