fix: refs #6727 No delete log tables data in clean procedures #2896
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue