DELIMITER $$
USE `rnia`$$
DROP TRIGGER /*!50032 IF EXISTS */ `animais_register_deleted`$$
CREATE
    /*!50017 DEFINER = `apps`@`localhost` */
    TRIGGER `animais_register_deleted` AFTER DELETE ON `animais` 
    FOR EACH ROW BEGIN
	CALL register_deleted('animais', OLD.id);
    END;
$$
DELIMITER ;


DELIMITER $$
USE `rnia`$$
DROP TRIGGER /*!50032 IF EXISTS */ `entidades_register_deleted`$$
CREATE
    /*!50017 DEFINER = `apps`@`localhost` */
    TRIGGER `entidades_register_deleted` AFTER DELETE ON `entidades` 
    FOR EACH ROW BEGIN
	CALL register_deleted('entidades', OLD.id);
    END;
$$
DELIMITER ;


DELIMITER $$
USE `rnia`$$
DROP TRIGGER /*!50032 IF EXISTS */ `entidades_exploracoes_register_deleted`$$
CREATE
    /*!50017 DEFINER = `apps`@`localhost` */
    TRIGGER `entidades_exploracoes_register_deleted` AFTER DELETE ON `entidades_exploracoes` 
    FOR EACH ROW BEGIN
	CALL register_deleted('entidades_exploracoes', OLD.id);
    END;
$$
DELIMITER ;


DELIMITER $$
USE `rnia`$$
DROP TRIGGER /*!50032 IF EXISTS */ `exploracoes_register_deleted`$$
CREATE
    /*!50017 DEFINER = `apps`@`localhost` */
    TRIGGER `exploracoes_register_deleted` AFTER DELETE ON `exploracoes` 
    FOR EACH ROW BEGIN
	CALL register_deleted('exploracoes', OLD.id);
    END;
$$
DELIMITER ;


DELIMITER $$
USE `rnia`$$
DROP TRIGGER /*!50032 IF EXISTS */ `movimentos_register_deleted`$$
CREATE
    /*!50017 DEFINER = `apps`@`localhost` */
    TRIGGER `movimentos_register_deleted` AFTER DELETE ON `movimentos` 
    FOR EACH ROW BEGIN
	CALL register_deleted('movimentos', OLD.id);
    END;
$$
DELIMITER ;


DELIMITER $$
USE `rnia`$$
DROP TRIGGER /*!50032 IF EXISTS */ `movimentos_animais_register_deleted`$$
CREATE
    /*!50017 DEFINER = `apps`@`localhost` */
    TRIGGER `movimentos_animais_register_deleted` AFTER DELETE ON `movimentos_animais` 
    FOR EACH ROW BEGIN
	CALL register_deleted('movimentos_animais', OLD.id);
    END;
$$
DELIMITER ;














