From b2cf142079648075ecefc4e4023e9bf25a72641a Mon Sep 17 00:00:00 2001 From: "valdir.cordeiro" Date: Fri, 15 Dec 2023 09:16:23 -0300 Subject: [PATCH] =?UTF-8?q?bug#al-3390=20Comporte=20-=20GLPI=2068308=20esp?= =?UTF-8?q?ecifica=C3=A7=C3=B5es=20para=20a=20API=20de=20consulta=20de=20P?= =?UTF-8?q?assaporte=20de=20Gratuidade=20da=20AGR=20Goi=C3=A1s=20dev:=20qu?= =?UTF-8?q?a:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- src/db/migration/V20231207_1052_AL3390.sql | 30 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/db/migration/V20231207_1052_AL3390.sql diff --git a/pom.xml b/pom.xml index 31cade36e..1591ef2ba 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 br.com.rjconsultores Flyway - 1.22.2 + 1.23.0 diff --git a/src/db/migration/V20231207_1052_AL3390.sql b/src/db/migration/V20231207_1052_AL3390.sql new file mode 100644 index 000000000..789b4b107 --- /dev/null +++ b/src/db/migration/V20231207_1052_AL3390.sql @@ -0,0 +1,30 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE EMPRESA ADD (INDINTEGRACAOAGR NUMBER(1,0), SENHAINTEGRACAOAGR VARCHAR2(100))'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CATEGORIA ADD INDINTEGRACAOAGR NUMBER(1,0)'; + exception when column_exists then null; +end; +/ +declare + dup_val_on_index exception; + except_02291 exception; + + pragma exception_init (dup_val_on_index , -00001); + pragma exception_init (except_02291 , -02291); +begin + execute immediate 'INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, ''URL_API_AGR'', ''URL DE ACESSO DA API DA AGR'', ''https://www.ouvidoria.agr.go.gov.br/gratuidadeservice/api/gratuidade/consultar-gratuidade?usuario=CNPJ' || '&' || 'senha=SENHAHASH'', ''1'', ''1'', ''1'', sysdate, ''1'')'; + + exception + when dup_val_on_index then null; + when except_02291 then null; +end; \ No newline at end of file