Merge pull request 'fix: refs #6727 No delete log tables data in clean procedures' (!2896) from 6727-noDeleteLogInProc into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #2896
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Guillermo Bonet 2024-08-29 05:14:47 +00:00
commit e6e142ce80
1 changed files with 0 additions and 6 deletions

View File

@ -19,14 +19,12 @@ BEGIN
DELETE FROM workerActivity WHERE created < v2Years; DELETE FROM workerActivity WHERE created < v2Years;
DELETE FROM ticketParking WHERE created < v2Months; DELETE FROM ticketParking WHERE created < v2Months;
DELETE FROM routesMonitor WHERE dated < v2Months; DELETE FROM routesMonitor WHERE dated < v2Months;
DELETE FROM workerTimeControlLog WHERE created < v2Months;
DELETE FROM `message` WHERE sendDate < v2Months; DELETE FROM `message` WHERE sendDate < v2Months;
DELETE FROM messageInbox WHERE sendDate < v2Months; DELETE FROM messageInbox WHERE sendDate < v2Months;
DELETE FROM messageInbox WHERE sendDate < v2Months; DELETE FROM messageInbox WHERE sendDate < v2Months;
DELETE FROM workerTimeControl WHERE timed < v4Years; DELETE FROM workerTimeControl WHERE timed < v4Years;
DELETE FROM itemShelving WHERE created < util.VN_CURDATE() AND visible = 0; DELETE FROM itemShelving WHERE created < util.VN_CURDATE() AND visible = 0;
DELETE FROM ticketDown WHERE created < util.yesterday(); DELETE FROM ticketDown WHERE created < util.yesterday();
DELETE FROM entryLog WHERE creationDate < v2Months;
DELETE IGNORE FROM expedition WHERE created < v26Months; DELETE IGNORE FROM expedition WHERE created < v26Months;
DELETE cs DELETE cs
FROM sms s FROM sms s
@ -61,11 +59,8 @@ BEGIN
DELETE b FROM buy b DELETE b FROM buy b
JOIN entryConfig e ON e.defaultEntry = b.entryFk JOIN entryConfig e ON e.defaultEntry = b.entryFk
WHERE b.created < v2Months; WHERE b.created < v2Months;
DELETE FROM itemShelvingLog WHERE created < v2Months;
DELETE FROM stockBuyed WHERE creationDate < v2Months; DELETE FROM stockBuyed WHERE creationDate < v2Months;
DELETE FROM itemCleanLog WHERE created < util.VN_NOW() - INTERVAL 1 YEAR;
DELETE FROM printQueue WHERE statusCode = 'printed' AND created < v2Months; DELETE FROM printQueue WHERE statusCode = 'printed' AND created < v2Months;
DELETE FROM ticketLog WHERE creationDate <= v5Years;
-- Equipos duplicados -- Equipos duplicados
DELETE w.* DELETE w.*
FROM workerTeam w FROM workerTeam w
@ -174,7 +169,6 @@ BEGIN
-- Borra los registros de collection y ticketcollection -- Borra los registros de collection y ticketcollection
DELETE FROM collection WHERE created < v2Months; DELETE FROM collection WHERE created < v2Months;
DELETE FROM travelLog WHERE creationDate < v3Months;
CALL shelving_clean(); CALL shelving_clean();