From 830573e229985ec1d8871d1e96619334a94e880e Mon Sep 17 00:00:00 2001 From: ivanm Date: Wed, 20 Nov 2024 14:49:55 +0100 Subject: [PATCH] refactor: refs #7690 remove modifications printQueue_check.sql --- db/routines/vn/events/printQueue_check.sql | 14 +++++++------- db/versions/11354-aquaMastic/00-firstScript.sql | 4 +--- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/db/routines/vn/events/printQueue_check.sql b/db/routines/vn/events/printQueue_check.sql index 8a2552423..cddba8cf8 100644 --- a/db/routines/vn/events/printQueue_check.sql +++ b/db/routines/vn/events/printQueue_check.sql @@ -33,10 +33,10 @@ DO BEGIN FROM printQueue WHERE statusCode = 'queued'; SELECT isAlreadyNotified INTO vIsAlreadyNotified - FROM printingQueueConfig; + FROM printingQueueCheck; - IF (SELECT lastCount FROM printingQueueConfig) = vCurrentCount AND - (SELECT lastCheckSum FROM printingQueueConfig) = vCheckSum AND + IF (SELECT lastCount FROM printingQueueCheck) = vCurrentCount AND + (SELECT lastCheckSum FROM printingQueueCheck) = vCheckSum AND vIsAlreadyNotified = FALSE AND vCurrentCount > 0 THEN @@ -67,16 +67,16 @@ DO BEGIN CONCAT('Hay ', vCurrentCount, ' lineas bloqueadas', vTableQueue, '') ); - UPDATE printingQueueConfig SET isAlreadyNotified = TRUE; + UPDATE printingQueueCheck SET isAlreadyNotified = TRUE; END IF; - IF (SELECT lastCount FROM printingQueueConfig) > vCurrentCount AND + IF (SELECT lastCount FROM printingQueueCheck) > vCurrentCount AND vIsAlreadyNotified = TRUE THEN - UPDATE printingQueueConfig SET isAlreadyNotified = FALSE; + UPDATE printingQueueCheck SET isAlreadyNotified = FALSE; END IF; - UPDATE printingQueueConfig + UPDATE printingQueueCheck SET lastCount = vCurrentCount, lastCheckSum = vCheckSum; diff --git a/db/versions/11354-aquaMastic/00-firstScript.sql b/db/versions/11354-aquaMastic/00-firstScript.sql index 98fe9d956..dda3f4752 100644 --- a/db/versions/11354-aquaMastic/00-firstScript.sql +++ b/db/versions/11354-aquaMastic/00-firstScript.sql @@ -1,4 +1,2 @@ RENAME TABLE vn.workerTimeControlParams TO vn.workerTimeControlParams__; -ALTER TABLE vn.workerTimeControlParams__ COMMENT='@deprecated 2024-11-19'; - -RENAME TABLE vn.printingQueueCheck TO vn.printingQueueConfig; \ No newline at end of file +ALTER TABLE vn.workerTimeControlParams__ COMMENT='@deprecated 2024-11-19'; \ No newline at end of file