Merge pull request 'feat: refs #7584 workerTimeControl_afterDelete' (!3307) from 7584-workerTimeControl_afterDelete into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #3307
Reviewed-by: Juan Ferrer <juan@verdnatura.es>
This commit is contained in:
Robert Ferrús 2025-01-10 10:05:59 +00:00
commit f6f8f2214c
1 changed files with 7 additions and 5 deletions

View File

@ -3,10 +3,12 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`workerTimeControl_after
AFTER DELETE ON `workerTimeControl` AFTER DELETE ON `workerTimeControl`
FOR EACH ROW FOR EACH ROW
BEGIN BEGIN
INSERT INTO workerLog IF account.myUser_getId() IS NOT NULL THEN
SET `action` = 'delete', INSERT INTO workerLog
`changedModel` = 'WorkerTimeControl', SET `action` = 'delete',
`changedModelId` = OLD.id, `changedModel` = 'WorkerTimeControl',
`userFk` = account.myUser_getId(); `changedModelId` = OLD.id,
`userFk` = account.myUser_getId();
END IF;
END$$ END$$
DELIMITER ; DELIMITER ;