From a9eb92888a39058c304ba143a9a9523360f4455d Mon Sep 17 00:00:00 2001 From: valdir Date: Mon, 24 May 2021 18:58:11 +0000 Subject: [PATCH] =?UTF-8?q?0022382:=20Aguia=20Branca=20-=20GLPI=20-=203801?= =?UTF-8?q?3=20-=20[PROJETO=20SPRINT=2001]=20-=20VENDAS=20-=20DATA=20DA=20?= =?UTF-8?q?VIAGEM=20NO=20DABPE=200022377:=20GLPI=2037944=20-=20[PROJETO=20?= =?UTF-8?q?SPRINT=2001]=20-=20ADM=20-=20CUPOM=20DE=20EMBARQUE=20NA=20VENDA?= =?UTF-8?q?/CONFIRMA=C3=87=C3=83O=20EM=20ABERTO=200022367:=20glpi=2037935?= =?UTF-8?q?=20-[PROJETO=20SPRINT=2001]=20-=20ADM=20DEV=20-=20FLAGS=20DA=20?= =?UTF-8?q?TELA=20DE=20TIPO=20DE=20PASSAGEM=20bug#22382=20bug#22377=20bug#?= =?UTF-8?q?22367=20dev:valdevir=20qua:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@106829 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../migration/V20210521_1034__mantis22367.sql | 23 +++++++++++++++++++ .../migration/V20210521_1506__mantis22377.sql | 15 ++++++++++++ .../migration/V20210521_1034__mantis22367.sql | 14 +++++++++++ .../migration/V20210521_1506__mantis22377.sql | 6 +++++ 4 files changed, 58 insertions(+) create mode 100644 src/db/migration/V20210521_1034__mantis22367.sql create mode 100644 src/db/migration/V20210521_1506__mantis22377.sql create mode 100644 src/db/postgresql/migration/V20210521_1034__mantis22367.sql create mode 100644 src/db/postgresql/migration/V20210521_1506__mantis22377.sql diff --git a/src/db/migration/V20210521_1034__mantis22367.sql b/src/db/migration/V20210521_1034__mantis22367.sql new file mode 100644 index 000000000..36702c8dd --- /dev/null +++ b/src/db/migration/V20210521_1034__mantis22367.sql @@ -0,0 +1,23 @@ +declare + object_exists exception; + except_01451 exception; + except_01442 exception; + + pragma exception_init (object_exists , -01430); + pragma exception_init (except_01451 , -01451); + pragma exception_init (except_01442 , -01442); +begin + execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO ADD (INDPERMITETROCA NUMBER(1,0), INDPERMITETRANSFERENCIA NUMBER(1,0) ) '; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'update CATEGORIA_DESCUENTO set INDPERMITETROCA = INDPERMITETROCATRANSFERENCIA , INDPERMITETRANSFERENCIA = INDPERMITETROCATRANSFERENCIA'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20210521_1506__mantis22377.sql b/src/db/migration/V20210521_1506__mantis22377.sql new file mode 100644 index 000000000..f58f64075 --- /dev/null +++ b/src/db/migration/V20210521_1506__mantis22377.sql @@ -0,0 +1,15 @@ +declare + object_exists exception; + except_01451 exception; + except_01442 exception; + + pragma exception_init (object_exists , -01430); + pragma exception_init (except_01451 , -01451); + pragma exception_init (except_01442 , -01442); +begin + execute immediate 'ALTER TABLE EMPRESA ADD (INDNAOIMPRIMECUPOMVENDABERTO NUMBER(1,0), INDNAOIMPRIMECUPOMCONFABERTO NUMBER(1,0) ) '; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20210521_1034__mantis22367.sql b/src/db/postgresql/migration/V20210521_1034__mantis22367.sql new file mode 100644 index 000000000..e3444964c --- /dev/null +++ b/src/db/postgresql/migration/V20210521_1034__mantis22367.sql @@ -0,0 +1,14 @@ +DO $$ +BEGIN + ALTER TABLE CATEGORIA_DESCUENTO ADD (INDPERMITETROCA NUMBER(1,0), INDPERMITETRANSFERENCIA NUMBER(1,0) ); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ + +DO $$ +BEGIN + update CATEGORIA_DESCUENTO set INDPERMITETROCA = INDPERMITETROCATRANSFERENCIA , INDPERMITETRANSFERENCIA = INDPERMITETROCATRANSFERENCIA; + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20210521_1506__mantis22377.sql b/src/db/postgresql/migration/V20210521_1506__mantis22377.sql new file mode 100644 index 000000000..8935730f1 --- /dev/null +++ b/src/db/postgresql/migration/V20210521_1506__mantis22377.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE EMPRESA ADD (INDNAOIMPRIMECUPOMVENDABERTO NUMBER(1,0), INDNAOIMPRIMECUPOMCONFABERTO NUMBER(1,0)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file