luis.espina 2024-08-21 16:41:50 -04:00
commit b7573459e3
73 changed files with 470 additions and 81 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.80.0</version> <version>1.86.0</version>
<distributionManagement> <distributionManagement>
<repository> <repository>

View File

@ -1,7 +0,0 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE EMPRESA ADD (INDIMPRESSAOAPOSCONFABERTO NUMBER(1))';
exception when column_exists then null;
end;

View File

@ -0,0 +1,13 @@
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 funcion_sistema (funcionsistema_id,sistema_id,nombfuncion,descruta,activo,fecmodif,usuario_id) values
(FUNCION_SISTEMA_SEQ.NEXTVAL,1,''ADM > CATALOGO > TIPODOCUMENTO'', ''COM.RJCONSULTORES.ADMINISTRACION.GUI.CATALOGO.MENU.TIPODOCUMENTO'',1,SYSDATE,-1)';
exception
when dup_val_on_index then null;
when except_02291 then null;
end;

View File

@ -34,37 +34,11 @@ begin
"FECMODIF" DATE, "FECMODIF" DATE,
"USUARIO_ID" NUMBER(7,0), "USUARIO_ID" NUMBER(7,0),
"DOCCONTRATO" BLOB, "DOCCONTRATO" BLOB,
"ORMAPAGO_ID" NUMBER (7), "FORMAPAGO_ID" NUMBER (7),
"USUARIOAUTORIZACREDITO" NUMBER (7), "USUARIOAUTORIZACREDITO" NUMBER (7),
"FECHORAUTORIZACREDITO" DATE "FECHORAUTORIZACREDITO" DATE,
"DOCLISTAPASAJEROS" BLOB,
"DOCCUMPLIMIENTOSERVICIO" BLOB
)'; )';
exception when object_exists then null; exception when object_exists then null;
end; end;
begin
execute immediate
'CREATE SEQUENCE "SOLICITUD_EXPRESO_SEQ" MINVALUE 10000 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 10000';
exception when object_exists then null;
end;
begin
execute immediate
'ALTER TABLE "SOLICITUD_EXPRESO"
ADD FOREIGN KEY ("CIUDADORIGEN_ID")
REFERENCES "CIUDAD" ("CIUDAD_ID") ENABLE';
exception when object_exists then null;
end;
begin
execute immediate
'ALTER TABLE "SOLICITUD_EXPRESO"
ADD FOREIGN KEY ("CIUDADDESTINO_ID")
REFERENCES "CIUDAD" ("CIUDAD_ID") ENABLE';
exception when object_exists then null;
end;
begin
execute immediate
'ALTER TABLE "SOLICITUD_EXPRESO"
ADD FOREIGN KEY ("TIPOIDENTIFICACION_ID")
REFERENCES "TIPO_IDENTIFICACION" ("TIPOIDENTIFICACION_ID") ENABLE';
exception when object_exists then null;
end;

View File

@ -17,20 +17,3 @@ begin
)'; )';
exception when object_exists then null; exception when object_exists then null;
end; end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE SEQUENCE "TRAYECTOS_EXPRESO_SEQ" MINVALUE 10000 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 10000';
exception when object_exists then null;
end;
begin
execute immediate
'ALTER TABLE "TRAYECTOS_EXPRESOS"
ADD FOREIGN KEY ("SOLICITUDEXPRESO_ID")
REFERENCES "SOLICITUD_EXPRESO" ("SOLICITUDEXPRESO_ID") ENABLE';
exception when object_exists then null;
end;

View File

@ -1,29 +1,23 @@
declare declare
object_exists exception; dup_val_on_index exception;
pragma exception_init (object_exists , -00955); except_02291 exception;
pragma exception_init (dup_val_on_index , -00001);
pragma exception_init (except_02291 , -02291);
begin begin
execute immediate execute immediate
'Insert into CONSTANTE ( 'insert into CONSTANTE values (
"CONSTANTE_ID",
"NOMBCONSTANTE",
"DESCCONSTANTE",
"INDTIPOCONSTANTE",
"VALORCONSTANTE",
"INDMANTENIMIENTOUSUARIO",
"ACTIVO",
"FECMODIF",
"USUARIO_ID"
)
values (
CONSTANTE_SEQ.NEXTVAL, CONSTANTE_SEQ.NEXTVAL,
"FORMAPAGOCREDITO_ID", ''FORMAPAGOCREDITO_ID'',
"ID de Pago a Crédito Expresos", ''ID de Pago a Crédito Expresos'',
null, 1,
"2", ''2'',
null, 1,
"1", 1,
sysdate, sysdate,
"1" 1
);'; )';
exception when object_exists then null; exception
when dup_val_on_index then null;
when except_02291 then null;
end; end;

View File

@ -0,0 +1,17 @@
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 funcion_sistema (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,FECMODIF,USUARIO_ID)
VALUES
(funcion_sistema_seq.NEXTVAL, 1, ''ADM > CONFIGURAÇÃO COMERCIAL >> NEGOCIOS CORPORATIVOS >> LEGALIZAÇÃO MASSIVA'',
''COM.RJCONSULTORES.ADMINISTRACION.GUI.CONFIGURACIONECCOMERCIALES.MENU.LEGALIZAR'', 1, SYSDATE, 1)';
exception
when dup_val_on_index then null;
when except_02291 then null;
end;

View File

@ -0,0 +1,14 @@
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 FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,FECMODIF,USUARIO_ID)
VALUES (FUNCION_SISTEMA_SEQ.nextval,''1'',''ADM > CONFIGURAÇÃO COMERCIAL >> NEGOCIOS CORPORATIVOS >> RELATORIO DETALHES CONTRATO'',
''COM.RJCONSULTORES.ADMINISTRACION.GUI.CONFIGURACIONECCOMERCIALES.MENU.RELATORIODETALHESCONTRATO'',''1'',CURRENT_DATE,''1'')';
exception
when dup_val_on_index then null;
when except_02291 then null;
end;

View File

@ -0,0 +1,37 @@
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 TIPO_IDENTIFICACION ADD INDEXIBECONFIRMACAOTOTALBUS NUMBER(1,0)';
exception
when object_exists then null;
when except_01451 then null;
when except_01442 then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE SEQUENCE "TIPO_IDENTIFICACION_SEQ" MINVALUE 1 MAXVALUE 9999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE';
exception when object_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 'UPDATE TIPO_IDENTIFICACION SET INDEXIBECONFIRMACAOTOTALBUS = 1';
exception
when dup_val_on_index then null;
when except_02291 then null;
end;

View File

@ -0,0 +1,15 @@
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 SOLICITUD_EXPRESO ADD (DOCCUMPLIMIENTOSERVICIO BLOB)';
exception
when object_exists then null;
when except_01451 then null;
when except_01442 then null;
end;

View File

@ -0,0 +1,31 @@
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 VOUCHER ADD DATA_LEGALIZA DATE';
exception
when object_exists then null;
when except_01451 then null;
when except_01442 then null;
end;
/
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 VOUCHER ADD DATA_FATURA DATE';
exception
when object_exists then null;
when except_01451 then null;
when except_01442 then null;
end;

View File

@ -0,0 +1,8 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE SEQUENCE "SOLICITUD_EXPRESO_SEQ" MINVALUE 10000 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 10000';
exception when object_exists then null;
end;

View File

@ -0,0 +1,21 @@
declare
object_exists exception;
except_02275 exception;
except_02270 exception;
except_02261 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_02275 , -02275);
pragma exception_init (except_02270 , -02270);
pragma exception_init (except_02261 , -02261);
begin
execute immediate
'ALTER TABLE "SOLICITUD_EXPRESO"
ADD FOREIGN KEY ("CIUDADORIGEN_ID")
REFERENCES "CIUDAD" ("CIUDAD_ID") ENABLE';
exception
when object_exists then null;
when except_02275 then null;
when except_02270 then null;
when except_02261 then null;
end;

View File

@ -0,0 +1,21 @@
declare
object_exists exception;
except_02275 exception;
except_02270 exception;
except_02261 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_02275 , -02275);
pragma exception_init (except_02270 , -02270);
pragma exception_init (except_02261 , -02261);
begin
execute immediate
'ALTER TABLE "SOLICITUD_EXPRESO"
ADD FOREIGN KEY ("CIUDADDESTINO_ID")
REFERENCES "CIUDAD" ("CIUDAD_ID") ENABLE';
exception
when object_exists then null;
when except_02275 then null;
when except_02270 then null;
when except_02261 then null;
end;

View File

@ -0,0 +1,21 @@
declare
object_exists exception;
except_02275 exception;
except_02270 exception;
except_02261 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_02275 , -02275);
pragma exception_init (except_02270 , -02270);
pragma exception_init (except_02261 , -02261);
begin
execute immediate
'ALTER TABLE "SOLICITUD_EXPRESO"
ADD FOREIGN KEY ("TIPOIDENTIFICACION_ID")
REFERENCES "TIPO_IDENTIFICACION" ("TIPOIDENTIFICACION_ID") ENABLE';
exception
when object_exists then null;
when except_02275 then null;
when except_02270 then null;
when except_02261 then null;
end;

View File

@ -0,0 +1,8 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE SEQUENCE "TRAYECTOS_EXPRESO_SEQ" MINVALUE 10000 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 10000';
exception when object_exists then null;
end;

View File

@ -0,0 +1,21 @@
declare
object_exists exception;
except_02275 exception;
except_02270 exception;
except_02261 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_02275 , -02275);
pragma exception_init (except_02270 , -02270);
pragma exception_init (except_02261 , -02261);
begin
execute immediate
'ALTER TABLE "TRAYECTOS_EXPRESOS"
ADD FOREIGN KEY ("SOLICITUDEXPRESO_ID")
REFERENCES "SOLICITUD_EXPRESO" ("SOLICITUDEXPRESO_ID") ENABLE';
exception
when object_exists then null;
when except_02275 then null;
when except_02270 then null;
when except_02261 then null;
end;

View File

@ -0,0 +1,14 @@
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 FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,FECMODIF,USUARIO_ID)
VALUES (FUNCION_SISTEMA_SEQ.nextval,''1'',''ADM > CONFIGURAÇÃO COMERCIAL >> NEGOCIOS CORPORATIVOS >> RELATORIO SALDOS CONTRATOS'',
''COM.RJCONSULTORES.ADMINISTRACION.GUI.CONFIGURACIONECCOMERCIALES.MENU.RELATORIOSALDOSCONTRATOS'',''1'',CURRENT_DATE,''1'')';
exception
when dup_val_on_index then null;
when except_02291 then null;
end;

View File

@ -0,0 +1,101 @@
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 FUNCION_SISTEMA (FUNCIONSISTEMA_ID, SISTEMA_ID, NOMBFUNCION, DESCRUTA, ACTIVO, FECMODIF, USUARIO_ID)
VALUES (FUNCION_SISTEMA_SEQ.nextval, 1, ''ADM > Expresso'',
''COM.RJCONSULTORES.ADMINISTRACION.GUI.EXPRESSOS'', 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 FUNCION_SISTEMA (FUNCIONSISTEMA_ID, SISTEMA_ID, NOMBFUNCION, DESCRUTA, ACTIVO, FECMODIF, USUARIO_ID)
VALUES (FUNCION_SISTEMA_SEQ.nextval, 1, ''ADM > Expresso > Expresso a ser cotado'',
''COM.RJCONSULTORES.ADMINISTRACION.GUI.EXPRESSOS.EXPRESSOASERCOTADO'', 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 FUNCION_SISTEMA (FUNCIONSISTEMA_ID, SISTEMA_ID, NOMBFUNCION, DESCRUTA, ACTIVO, FECMODIF, USUARIO_ID)
VALUES (FUNCION_SISTEMA_SEQ.nextval, 1, ''ADM > Expresso > Taxa de contrato'',
''COM.RJCONSULTORES.ADMINISTRACION.GUI.EXPRESSOS.TAXADECONTRATO'', 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 FUNCION_SISTEMA (FUNCIONSISTEMA_ID, SISTEMA_ID, NOMBFUNCION, DESCRUTA, ACTIVO, FECMODIF, USUARIO_ID)
VALUES (FUNCION_SISTEMA_SEQ.nextval, 1, ''ADM > Expresso > Programação de veículos'',
''COM.RJCONSULTORES.ADMINISTRACION.GUI.EXPRESSOS.PROGRAMACAODEVEICULOS'', 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 FUNCION_SISTEMA (FUNCIONSISTEMA_ID, SISTEMA_ID, NOMBFUNCION, DESCRUTA, ACTIVO, FECMODIF, USUARIO_ID)
VALUES (FUNCION_SISTEMA_SEQ.nextval, 1, ''ADM > Expresso > Documentos'',
''COM.RJCONSULTORES.ADMINISTRACION.GUI.EXPRESSOS.DOCUMENTOS'', 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 FUNCION_SISTEMA (FUNCIONSISTEMA_ID, SISTEMA_ID, NOMBFUNCION, DESCRUTA, ACTIVO, FECMODIF, USUARIO_ID)
VALUES (FUNCION_SISTEMA_SEQ.nextval, 1, ''ADM > Expresso > Conformidade de serviço'',
''COM.RJCONSULTORES.ADMINISTRACION.GUI.EXPRESSOS.CONFORMIDADEDESERVICO'', 1,
SYSDATE, 1)';
exception
when dup_val_on_index then null;
when except_02291 then null;
end;

View File

@ -0,0 +1,17 @@
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 funcion_sistema (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,FECMODIF,USUARIO_ID)
VALUES
(funcion_sistema_seq.NEXTVAL, 1, ''ADM > CONFIGURAÇÃO COMERCIAL >> NEGOCIOS CORPORATIVOS >> FATURAMENTO VOUCHER'',
''COM.RJCONSULTORES.ADMINISTRACION.GUI.CONFIGURACIONECCOMERCIALES.MENU.FATURARVOUCHER'', 1, SYSDATE, 1)';
exception
when dup_val_on_index then null;
when except_02291 then null;
end;

View File

@ -0,0 +1,31 @@
-- INSERT / UPDATE
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 'update FUNCION_SISTEMA set NOMBFUNCION = ''ADM > RELATORIOS > RELATORIOS > NEGOCIOS CORPORATIVOS >> RELATORIO DETALHES CONTRATO'',
DESCRUTA = ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.NEGCORPORATIVOS.MENU.RELATORIODETALHESCONTRATO'' where NOMBFUNCION = ''ADM > CONFIGURAÇÃO COMERCIAL >> NEGOCIOS CORPORATIVOS >> RELATORIO DETALHES CONTRATO'' ';
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 'update FUNCION_SISTEMA set NOMBFUNCION = ''ADM > RELATORIOS > RELATORIOS > NEGOCIOS CORPORATIVOS >> RELATORIO SALDOS CONTRATOS'',
DESCRUTA = ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.NEGCORPORATIVOS.MENU.RELATORIOSALDOSCONTRATOS'' where NOMBFUNCION = ''ADM > CONFIGURAÇÃO COMERCIAL >> NEGOCIOS CORPORATIVOS >> RELATORIO SALDOS CONTRATOS'' ';
exception
when dup_val_on_index then null;
when except_02291 then null;
end;

View File

@ -0,0 +1,28 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate '
CREATE TABLE EMPRESA_CONFIG_LAYOUT (
EMPRESACONFIGLAYOUT_ID NUMBER(7, 0) PRIMARY KEY,
EMPRESA_ID NUMBER(7, 0),
IMPRESIONLAYOUTCONFIG_ID NUMBER(7, 0),
TIPOVENTA_ID NUMBER(2, 0),
INDEMAIL NUMBER(1, 0),
ACTIVO NUMBER(1, 0),
FECMODIF DATE,
USUARIO_ID NUMBER(7, 0),
CONSTRAINT FK_EMP_CONF_LAYOUT FOREIGN KEY ( EMPRESA_ID )
REFERENCES EMPRESA ( EMPRESA_ID )
)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE SEQUENCE "EMPRESA_CONFIG_LAYOUT_SEQ" INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';
exception when object_exists then null;
end;
/

View File

@ -0,0 +1,15 @@
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 VOUCHER ADD DATA_CORTE DATE';
exception
when object_exists then null;
when except_01451 then null;
when except_01442 then null;
end;

View File

@ -0,0 +1,12 @@
declare
object_exists exception;
except_00957 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_00957 , -00957);
begin
execute immediate 'ALTER TABLE EMPRESA_IZIPAY_CONFIG RENAME COLUMN DIAS_CANCELA TO MINUTOS_CANCELA';
exception
when object_exists then null;
when except_00957 then null;
end;