fix: update mandate_afterDelete trigger to log actions in clientLog and drop mandateLog table
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Carlos Andrés 2025-03-06 14:11:48 +01:00
parent 00f4fdf3f0
commit 760cc3b09a
2 changed files with 4 additions and 5 deletions

View File

@ -3,9 +3,9 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`mandate_afterDelete`
AFTER DELETE ON `mandate`
FOR EACH ROW
BEGIN
INSERT INTO mandateLog
INSERT INTO clientLog
SET `action` = 'delete',
`changedModel` = 'mandate',
`changedModel` = 'Mandate',
`changedModelId` = OLD.id,
`userFk` = account.myUser_getId();
END$$

View File

@ -2,6 +2,5 @@ ALTER TABLE vn.clientLog MODIFY COLUMN changedModel
ENUM('Client','Address','ClientContact','ClientDms','ClientObservation','ClientSample','ClientUnpaid','Greuge','Recovery','Mandate','TpvTransaction','WorkerDms','Sms')
CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT 'Client' NOT NULL;
UPDATE vn.clientLog
SET changedModel = 'Mandate'
WHERE changedModel = '';
DROP TABLE vn.mandateLog;