From 2702bde1fa2e169cf43b2b3b77440cc0eb6e649c Mon Sep 17 00:00:00 2001 From: wilian Date: Thu, 16 Jan 2020 20:17:28 +0000 Subject: [PATCH] bug#17842 dev:fred qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@99783 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20200114_1129__mantis17842.sql | 7 +++++++ src/db/migration/V20200114_1130__mantis17842.sql | 6 ++++++ src/db/migration/V20200114_1131__mantis17842.sql | 7 +++++++ src/db/migration/V20200115_1138__mantis17842.sql | 6 ++++++ src/db/migration/V20200115_1139__mantis17842.sql | 6 ++++++ .../postgresql/migration/V20200114_1131__mantis17842.sql | 6 ++++++ 6 files changed, 38 insertions(+) create mode 100644 src/db/migration/V20200114_1129__mantis17842.sql create mode 100644 src/db/migration/V20200114_1130__mantis17842.sql create mode 100644 src/db/migration/V20200114_1131__mantis17842.sql create mode 100644 src/db/migration/V20200115_1138__mantis17842.sql create mode 100644 src/db/migration/V20200115_1139__mantis17842.sql create mode 100644 src/db/postgresql/migration/V20200114_1131__mantis17842.sql diff --git a/src/db/migration/V20200114_1129__mantis17842.sql b/src/db/migration/V20200114_1129__mantis17842.sql new file mode 100644 index 000000000..b02b63792 --- /dev/null +++ b/src/db/migration/V20200114_1129__mantis17842.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CONSTANTE MODIFY DESCCONSTANTE VARCHAR2(200)'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20200114_1130__mantis17842.sql b/src/db/migration/V20200114_1130__mantis17842.sql new file mode 100644 index 000000000..b881fa6ec --- /dev/null +++ b/src/db/migration/V20200114_1130__mantis17842.sql @@ -0,0 +1,6 @@ +declare + begin + execute immediate 'INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, ''BPE_CONTINGENCIA_AUTOMATICA'', ''ATIVA CONTINGENCIA AUTOMATICA EM CASO DE TIMEOUT SEFAZ'', ''FALSE'', ''1'', ''1'', ''1'', sysdate, ''1'')'; + exception when others then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20200114_1131__mantis17842.sql b/src/db/migration/V20200114_1131__mantis17842.sql new file mode 100644 index 000000000..4a3d618fd --- /dev/null +++ b/src/db/migration/V20200114_1131__mantis17842.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE LOG_HISTORICO_CONTINGENCIA ADD (INDAUTOMATICA NUMBER(1))'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20200115_1138__mantis17842.sql b/src/db/migration/V20200115_1138__mantis17842.sql new file mode 100644 index 000000000..5d221e933 --- /dev/null +++ b/src/db/migration/V20200115_1138__mantis17842.sql @@ -0,0 +1,6 @@ +declare + begin + execute immediate 'INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, ''BPE_QTDE_TIMEOUT_SEFAZ'', ''CONTADOR DE TIMEOUTS SEFAZ PARA ATIVACAO CONTINGENCIA AUTOMATICA'', ''15'', ''1'', ''1'', ''1'', sysdate, ''1'')'; + exception when others then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20200115_1139__mantis17842.sql b/src/db/migration/V20200115_1139__mantis17842.sql new file mode 100644 index 000000000..bf7141c50 --- /dev/null +++ b/src/db/migration/V20200115_1139__mantis17842.sql @@ -0,0 +1,6 @@ +declare + begin + execute immediate 'INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, ''BPE_TEMPO_REMOVE_CONTINGENCIA_AUTOMATICA'', ''TEMPO PARA REMOVER CONTINGENCIA AUTOMATICA VIA TIMEOUT (EM MINUTOS)'', ''5'', ''1'', ''1'', ''1'', sysdate, ''1'')'; + exception when others then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20200114_1131__mantis17842.sql b/src/db/postgresql/migration/V20200114_1131__mantis17842.sql new file mode 100644 index 000000000..87325ac84 --- /dev/null +++ b/src/db/postgresql/migration/V20200114_1131__mantis17842.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE LOG_HISTORICO_CONTINGENCIA ADD (INDAUTOMATICA NUMBER(1)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file