Merge pull request 'bug#al-3390' (!85) from AL3390 into master

Reviewed-on: utilidades/Flyway#85
Reviewed-by: Gleison da Cruz <gleison.cruz@totvs.com.br>
master
Valdir Cordeiro 2023-12-15 12:29:48 +00:00
commit 032f68a8d9
2 changed files with 31 additions and 1 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId> <groupId>br.com.rjconsultores</groupId>
<artifactId>Flyway</artifactId> <artifactId>Flyway</artifactId>
<version>1.22.2</version> <version>1.23.0</version>
<distributionManagement> <distributionManagement>
<repository> <repository>

View File

@ -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;