From 9d0688c8853a92068c4045dcb9f9935f4a30ccdb Mon Sep 17 00:00:00 2001 From: "valdir.cordeiro" Date: Mon, 13 Mar 2023 16:53:04 -0300 Subject: [PATCH] bug#al-2213 Ouro e Prata - Espec_-_Bloquear-Desbloquear_desconto_via_API dev: qua: --- pom.xml | 2 +- src/db/migration/V20230310_1023_AL2213.sql | 15 +++++++++++++++ .../migration/V20230310_1023_AL2213.sql | 11 +++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 src/db/migration/V20230310_1023_AL2213.sql create mode 100644 src/db/postgresql/migration/V20230310_1023_AL2213.sql diff --git a/pom.xml b/pom.xml index 7cb1c7eac..7a2f50327 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 br.com.rjconsultores Flyway - 1.0.24 + 1.0.25 diff --git a/src/db/migration/V20230310_1023_AL2213.sql b/src/db/migration/V20230310_1023_AL2213.sql new file mode 100644 index 000000000..40a0d58b4 --- /dev/null +++ b/src/db/migration/V20230310_1023_AL2213.sql @@ -0,0 +1,15 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE PUNTO_VENTA ADD INDBLOQUEARDESCONTOAPI NUMBER(1,0)' ; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE PUNTO_VENTA ADD INDBLOQUEARDESCONTOWEB NUMBER(1,0)' ; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20230310_1023_AL2213.sql b/src/db/postgresql/migration/V20230310_1023_AL2213.sql new file mode 100644 index 000000000..85e7a8787 --- /dev/null +++ b/src/db/postgresql/migration/V20230310_1023_AL2213.sql @@ -0,0 +1,11 @@ +DO $$ +BEGIN + ALTER TABLE PUNTO_VENTA ADD INDBLOQUEARDESCONTOAPI NUMBER(1,0); +END +$$; +/ +DO $$ +BEGIN + ALTER TABLE PUNTO_VENTA ADD INDBLOQUEARDESCONTOWEB NUMBER(1,0); +END +$$; \ No newline at end of file