diff --git a/db/routines/vn/events/printQueue_check.sql b/db/routines/vn/events/printQueue_check.sql index cddba8cf8..8a2552423 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 printingQueueCheck; + FROM printingQueueConfig; - IF (SELECT lastCount FROM printingQueueCheck) = vCurrentCount AND - (SELECT lastCheckSum FROM printingQueueCheck) = vCheckSum AND + IF (SELECT lastCount FROM printingQueueConfig) = vCurrentCount AND + (SELECT lastCheckSum FROM printingQueueConfig) = vCheckSum AND vIsAlreadyNotified = FALSE AND vCurrentCount > 0 THEN @@ -67,16 +67,16 @@ DO BEGIN CONCAT('Hay ', vCurrentCount, ' lineas bloqueadas', vTableQueue, '') ); - UPDATE printingQueueCheck SET isAlreadyNotified = TRUE; + UPDATE printingQueueConfig SET isAlreadyNotified = TRUE; END IF; - IF (SELECT lastCount FROM printingQueueCheck) > vCurrentCount AND + IF (SELECT lastCount FROM printingQueueConfig) > vCurrentCount AND vIsAlreadyNotified = TRUE THEN - UPDATE printingQueueCheck SET isAlreadyNotified = FALSE; + UPDATE printingQueueConfig SET isAlreadyNotified = FALSE; END IF; - UPDATE printingQueueCheck + UPDATE printingQueueConfig SET lastCount = vCurrentCount, lastCheckSum = vCheckSum; diff --git a/db/versions/11354-aquaMastic/00-firstScript.sql b/db/versions/11354-aquaMastic/00-firstScript.sql new file mode 100644 index 000000000..98fe9d956 --- /dev/null +++ b/db/versions/11354-aquaMastic/00-firstScript.sql @@ -0,0 +1,4 @@ +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