salix/db/routines/cache/procedures/clean.sql

7 lines
197 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`clean`()
BEGIN
DELETE FROM cache.departure_limit WHERE Fecha < util.VN_CURDATE() - INTERVAL 1 MONTH;
END$$
DELIMITER ;