refactor: refs #6496 Deleted clean vn2008 #2104
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#2104
Loading…
Reference in New Issue
No description provided.
Delete Branch "6496-cleanVn2008"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -4,3 +4,3 @@
DECLARE vDateShort DATETIME;
SET vDateShort = TIMESTAMPADD(MONTH, -1, util.VN_CURDATE());
SET vDateShort = util.VN_CURDATE() - INTERVAL 1 MONTH;
millor v1Month com en el altre clean
@ -93,1 +83,3 @@
WHERE eta < v3Month;
FROM claim c
JOIN claimState cs ON cs.id = c.claimStateFk
WHERE cs.description = "Anulado"
cometes simples
@ -103,1 +94,4 @@
FROM travel t
LEFT JOIN entry e ON e.travelFk = t.id
JOIN travelThermograph th ON th.travelFk = t.id
WHERE t.shipped < TIMESTAMPADD(MONTH, -3, util.VN_CURDATE()) AND e.travelFk IS NULL;
formato fecha
@ -118,2 +112,2 @@
FROM vn.travel t
LEFT JOIN vn.entry e ON e.travelFk = t.id
FROM travel t
LEFT JOIN entry e ON e.travelFk = t.id
indentació LEFT
@ -114,2 +108,2 @@
FROM tmp.thermographToDelete tmp
JOIN vn.travelThermograph th ON th.id = tmp.id;
FROM tThermographToDelete tmp
JOIN travelThermograph th ON th.id = tmp.id;
indentació
@ -109,2 +103,2 @@
UPDATE tmp.thermographToDelete th
JOIN vn.dms d ON d.id = th.dmsFk
UPDATE tThermographToDelete th
JOIN dms d ON d.id = th.dmsFk
indentació
@ -134,1 +124,4 @@
FROM entry e
LEFT JOIN buy b ON b.entryFk = e.id
JOIN entryConfig ec ON e.id <> ec.defaultEntry
WHERE e.dated < TIMESTAMPADD(MONTH, -3, util.VN_CURDATE()) AND b.entryFK IS NULL;
formato fecha
@ -143,3 +135,3 @@
SELECT *
FROM vn.route r
FROM route r
WHERE created < TIMESTAMPADD(YEAR,-4,util.VN_CURDATE());
formato fecha
@ -158,3 +149,3 @@
SELECT *
FROM vn.dua
FROM dua
WHERE operated < TIMESTAMPADD(YEAR,-2,CURDATE());
formato fecha
@ -188,3 +177,2 @@
DELETE tt FROM ticketTracking tt JOIN vn.ticket t ON tt.ticketFk = t.id
WHERE t.shipped <= vDateShort;
-- Clean vn2008
eliminar comentario