From f214dd1ba847c60ac7489fe3db20e3472bb3c78a Mon Sep 17 00:00:00 2001 From: valdevir Date: Mon, 26 Oct 2020 14:51:16 +0000 Subject: [PATCH] =?UTF-8?q?fixes=20bug#20410=20qua:=20dev:Valdir=20Altera?= =?UTF-8?q?=C3=A7=C3=A3o=20adicionar=20apr=C3=A2metro=20url=20base=20segur?= =?UTF-8?q?o=20opcional.?= 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@103965 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20201023_1512__mantis20410.sql | 15 +++++++++++++++ src/db/migration/V20201023_1615__mantis20410.sql | 7 +++++++ .../migration/V20201023_1512__mantis20410.sql | 6 ++++++ .../migration/V20201023_1615__mantis20410.sql | 8 ++++++++ 4 files changed, 36 insertions(+) create mode 100644 src/db/migration/V20201023_1512__mantis20410.sql create mode 100644 src/db/migration/V20201023_1615__mantis20410.sql create mode 100644 src/db/postgresql/migration/V20201023_1512__mantis20410.sql create mode 100644 src/db/postgresql/migration/V20201023_1615__mantis20410.sql diff --git a/src/db/migration/V20201023_1512__mantis20410.sql b/src/db/migration/V20201023_1512__mantis20410.sql new file mode 100644 index 000000000..02bba0e82 --- /dev/null +++ b/src/db/migration/V20201023_1512__mantis20410.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 URLBASESEGURO VARCHAR2(50)'; + 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/migration/V20201023_1615__mantis20410.sql b/src/db/migration/V20201023_1615__mantis20410.sql new file mode 100644 index 000000000..5cfd70985 --- /dev/null +++ b/src/db/migration/V20201023_1615__mantis20410.sql @@ -0,0 +1,7 @@ +declare + dup_val_on_index exception; + pragma exception_init (dup_val_on_index , -00001); +begin + execute immediate 'Insert into CONSTANTE (CONSTANTE_ID,NOMBCONSTANTE,DESCCONSTANTE,INDTIPOCONSTANTE,VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID) values (CONSTANTE_SEQ.NEXTVAL,''CHAVE_CRIPTOGRAFIA_SEGURO_W2I'',''CHAVE CRIPTOGRAFIA SEGURO W2I'',''1'',''2'',''1'',''1'',sysdate,''1'')'; + exception when dup_val_on_index then null; +end; diff --git a/src/db/postgresql/migration/V20201023_1512__mantis20410.sql b/src/db/postgresql/migration/V20201023_1512__mantis20410.sql new file mode 100644 index 000000000..3774563af --- /dev/null +++ b/src/db/postgresql/migration/V20201023_1512__mantis20410.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE EMPRESA ADD (URLBASESEGURO VARCHAR(50)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20201023_1615__mantis20410.sql b/src/db/postgresql/migration/V20201023_1615__mantis20410.sql new file mode 100644 index 000000000..513c0da29 --- /dev/null +++ b/src/db/postgresql/migration/V20201023_1615__mantis20410.sql @@ -0,0 +1,8 @@ +DO $$ +BEGIN + INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) VALUES (nextval('CONSTANTE_SEQ'), 'CHAVE_CRIPTOGRAFIA_SEGURO_W2I', 'CHAVE CRIPTOGRAFIA SEGURO W2I', 'FALSE', '', '1', '1', now(), '1'); + EXCEPTION + WHEN OTHERS THEN NULL; + WHEN unique_violation THEN NULL; +END +$$; \ No newline at end of file