diff --git a/db/versions/11202-limeRuscus/00-addAlertLevel.sql b/db/versions/11202-limeRuscus/00-addAlertLevel.sql new file mode 100644 index 000000000..1f667946b --- /dev/null +++ b/db/versions/11202-limeRuscus/00-addAlertLevel.sql @@ -0,0 +1,6 @@ +UPDATE vn.alertLevel SET id = 5 WHERE id = 4; +UPDATE vn.alertLevel SET id = 4 WHERE id = 3; +UPDATE vn.alertLevel SET id = 3 WHERE id = 2; +UPDATE vn.alertLevel SET id = 2 WHERE id = 1; +INSERT INTO vn.alertLevel (code, id, hasToRecalcPrice) + VALUES ('APPROVED', 1, 1) \ No newline at end of file diff --git a/db/versions/11202-limeRuscus/01-updateStateAlertLevel.sql b/db/versions/11202-limeRuscus/01-updateStateAlertLevel.sql new file mode 100644 index 000000000..f7261c08a --- /dev/null +++ b/db/versions/11202-limeRuscus/01-updateStateAlertLevel.sql @@ -0,0 +1,21 @@ +UPDATE vn.state + SET alertLevel = 1 -- APPROVED + WHERE id IN ( + 3, -- Ok + 4 -- Impreso + ); + +UPDATE vn.state + SET alertLevel = 2 -- ON_PREVIOUS + WHERE id IN ( + 36, -- Previa Revisando + 37, -- Previa Revisado + 26, -- Prep Previa + 28, -- Previa OK + 29, -- Previa Impreso + 31, -- Polizon Impreso + 32, -- Polizon OK + 20, -- Asignado + 23, -- URGENTE + 33 -- Auto_Impreso + );