From 487f404f08aac40fecfa2d96b2fe746377a72357 Mon Sep 17 00:00:00 2001 From: emerson Date: Wed, 12 Jun 2019 18:16:19 +0000 Subject: [PATCH] =?UTF-8?q?fixes=20bug#0014278=20dev:=20thiago=20qua:=20wa?= =?UTF-8?q?llysson=20Implementa=C3=A7=C3=A3o=20efetuada.?= 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@94496 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../migration/V20190604_1714__mantis14278.sql | 29 +++++++++++++++++++ .../migration/V20190604_1714__mantis14278.sql | 18 ++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 src/db/migration/V20190604_1714__mantis14278.sql create mode 100644 src/db/postgresql/migration/V20190604_1714__mantis14278.sql diff --git a/src/db/migration/V20190604_1714__mantis14278.sql b/src/db/migration/V20190604_1714__mantis14278.sql new file mode 100644 index 000000000..3f2a8eafb --- /dev/null +++ b/src/db/migration/V20190604_1714__mantis14278.sql @@ -0,0 +1,29 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE LOG_HISTORICO_CONTINGENCIA ADD IND_AMBIENTE NUMBER(1,0)'; + exception when column_exists then null; +end; +/ +begin + execute immediate 'COMMENT ON COLUMN LOG_HISTORICO_CONTINGENCIA.IND_AMBIENTE IS ''1-Produção, 2-Homologação'''; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE EMPRESA_EMAIL ADD DESTINATARIO VARCHAR2(50)'; + exception when column_exists then null; +end; +/ +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,''TEMPO_ENVIO_EMAIL_CONTINGENCIA'',''Tempo de envio de email quando em contingência'',1,30,1,1,null,1)'; + exception when dup_val_on_index then null; +end; +/ \ No newline at end of file diff --git a/src/db/postgresql/migration/V20190604_1714__mantis14278.sql b/src/db/postgresql/migration/V20190604_1714__mantis14278.sql new file mode 100644 index 000000000..989da716a --- /dev/null +++ b/src/db/postgresql/migration/V20190604_1714__mantis14278.sql @@ -0,0 +1,18 @@ +DO $$ +BEGIN + ALTER TABLE LOG_HISTORICO_CONTINGENCIA ADD COLUMN IND_AMBIENTE NUMERIC(1,0); +END +$$; + +DO $$ +BEGIN + ALTER TABLE EMPRESA_EMAIL ADD COLUMN DESTINATARIO VARCHAR(50); +END +$$; + +DO $$ +BEGIN + INSERT INTO CONSTANTE (CONSTANTE_ID,NOMBCONSTANTE,DESCCONSTANTE,INDTIPOCONSTANTE,VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID) VALUES + (nextval('CONSTANTE_SEQ'),'TEMPO_ENVIO_EMAIL_CONTINGENCIA','Tempo de envio de email quando em contingência',1,30,1,1,null,1); +END +$$; \ No newline at end of file