From 1ec8d8d5a00016b67a406db79d026c99295f3598 Mon Sep 17 00:00:00 2001 From: ivanm Date: Sun, 22 Sep 2024 07:24:21 +0200 Subject: [PATCH 1/2] feat: refs #7994 update sale.originalQuantity --- db/versions/11251-navyChrysanthemum/00-firstScript.sql | 3 +++ db/versions/11251-navyChrysanthemum/01-firstScript.sql | 1 + 2 files changed, 4 insertions(+) create mode 100644 db/versions/11251-navyChrysanthemum/00-firstScript.sql create mode 100644 db/versions/11251-navyChrysanthemum/01-firstScript.sql diff --git a/db/versions/11251-navyChrysanthemum/00-firstScript.sql b/db/versions/11251-navyChrysanthemum/00-firstScript.sql new file mode 100644 index 000000000..50409c205 --- /dev/null +++ b/db/versions/11251-navyChrysanthemum/00-firstScript.sql @@ -0,0 +1,3 @@ +UPDATE sale + SET originalQuantity = quantity + WHERE originalQuantity IS NULL diff --git a/db/versions/11251-navyChrysanthemum/01-firstScript.sql b/db/versions/11251-navyChrysanthemum/01-firstScript.sql new file mode 100644 index 000000000..e3e08e0aa --- /dev/null +++ b/db/versions/11251-navyChrysanthemum/01-firstScript.sql @@ -0,0 +1 @@ +ALTER TABLE vn.sale MODIFY COLUMN originalQuantity decimal(10,2) DEFAULT 0.00 NOT NULL COMMENT 'Se utiliza para notificar a través de rocket los cambios de quantity'; \ No newline at end of file From 753f6d786661e5dbd642c261d229d58bc7047bb2 Mon Sep 17 00:00:00 2001 From: ivanm Date: Sun, 22 Sep 2024 07:27:43 +0200 Subject: [PATCH 2/2] feat: refs #7994 add schema --- db/versions/11251-navyChrysanthemum/00-firstScript.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/versions/11251-navyChrysanthemum/00-firstScript.sql b/db/versions/11251-navyChrysanthemum/00-firstScript.sql index 50409c205..801405e59 100644 --- a/db/versions/11251-navyChrysanthemum/00-firstScript.sql +++ b/db/versions/11251-navyChrysanthemum/00-firstScript.sql @@ -1,3 +1,3 @@ -UPDATE sale +UPDATE vn.sale SET originalQuantity = quantity WHERE originalQuantity IS NULL