From eaad989b3afaec94f31815516ad3dcfe8d4488e7 Mon Sep 17 00:00:00 2001 From: jgallego Date: Mon, 11 Nov 2024 13:57:49 +0100 Subject: [PATCH] fix: clean deletes also zoneEvent range records --- db/routines/vn/procedures/clean.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/clean.sql b/db/routines/vn/procedures/clean.sql index d3fed0242..fcee33c97 100644 --- a/db/routines/vn/procedures/clean.sql +++ b/db/routines/vn/procedures/clean.sql @@ -56,7 +56,7 @@ BEGIN AND ts.id IS NULL; DELETE FROM claim WHERE ticketCreated < v4Years; -- Robert ubicacion anterior de travelLog comentario para debug - DELETE FROM zoneEvent WHERE `type` = 'day' AND dated < v3Months; + DELETE FROM zoneEvent WHERE dated < v2Months OR ended < v2Months; DELETE b FROM buy b JOIN entryConfig e ON e.defaultEntry = b.entryFk WHERE b.created < v2Months;