Merge pull request 'bug#al-4269' (!121) from AL-4269 into master

Reviewed-on: http://18.235.188.113:3000/utilidades/Flyway/pulls/121
Reviewed-by: fabio <fabio.faria@rjconsultores.com.br>
master
Valdir Cordeiro 2024-06-12 19:39:07 +00:00
commit 5988a85809
4 changed files with 124 additions and 1 deletions

View File

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

View File

@ -0,0 +1,19 @@
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 USUARIO ADD (
INDRECUPERARSENHA NUMBER(1,0),
NOMBPATERNORECUPERAR VARCHAR(90),
MATRICULA VARCHAR(90),
DATANASCIMENTO DATE) ';
exception
when object_exists then null;
when except_01451 then null;
when except_01442 then null;
end;

View File

@ -0,0 +1,25 @@
declare
table_exists exception;
pragma exception_init (table_exists , -00955);
begin
execute immediate
'CREATE TABLE RECUPERAR_SENHA (
RECUPERARSENHA_ID NUMBER(7) NOT NULL,
PARAM VARCHAR2(100),
ACTIVO NUMBER(1),
FECMODIF DATE,
USUARIO_ID NUMBER(7),
PRIMARY KEY ( RECUPERARSENHA_ID )
)';
exception when table_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE SEQUENCE "RECUPERARSENHA_SEQ" INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';
exception when object_exists then null;
end;

View File

@ -0,0 +1,79 @@
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,INDTIPOCONSTANTE,
VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID)
values (CONSTANTE_SEQ.NEXTVAL,''HOST_SMTP_RECUPERACAOSENHA'',''HOST_SMTP_RECUPERACAOSENHA'',
null,''smtp.gmail.com'',null,''1'',sysdate,''1'')';
exception
when dup_val_on_index then null;
when except_02291 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,INDTIPOCONSTANTE,
VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID)
values (CONSTANTE_SEQ.NEXTVAL,''PORTA_SMTP_RECUPERACAOSENHA'',''PORTA_SMTP_RECUPERACAOSENHA'',
null,''587'',null,''1'',sysdate,''1'')';
exception
when dup_val_on_index then null;
when except_02291 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,INDTIPOCONSTANTE,
VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID)
values (CONSTANTE_SEQ.NEXTVAL,''USUARIO_SMTP_RECUPERACAOSENHA'',''USUARIO_SMTP_RECUPERACAOSENHA'',
null,null,null,''1'',sysdate,''1'')';
exception
when dup_val_on_index then null;
when except_02291 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,INDTIPOCONSTANTE,
VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID)
values (CONSTANTE_SEQ.NEXTVAL,''SENHAUSUARIO_SMTP_RECUPERACAOSENHA'',''SENHAUSUARIO_SMTP_RECUPERACAOSENHA'',
null,null,null,''1'',sysdate,''1'')';
exception
when dup_val_on_index then null;
when except_02291 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,INDTIPOCONSTANTE,
VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID)
values (CONSTANTE_SEQ.NEXTVAL,''URL_ADM'',''URL_ADM'',
null,null,null,''1'',sysdate,''1'')';
exception
when dup_val_on_index then null;
when except_02291 then null;
end;