diff --git a/src/com/rjconsultores/ventaboletos/FlyWay.java b/src/com/rjconsultores/ventaboletos/FlyWay.java index cad607344..69c5bf6ac 100644 --- a/src/com/rjconsultores/ventaboletos/FlyWay.java +++ b/src/com/rjconsultores/ventaboletos/FlyWay.java @@ -30,6 +30,7 @@ public class FlyWay { private static final FlyWay INSTANCE = new FlyWay(); final private static String TABELA_FLYWAY = "schema_version_cst"; + final private static String AMBIENTE_DEV = "dev"; final File JBOSS_DATA = getJBossDataDirectory(); private DataSource dataSource = null; @@ -113,13 +114,17 @@ public class FlyWay { } public boolean start() { - return start(null, null); + return start(null, null, false); + } + + public boolean start(Boolean isReloadFyway) { + return start(null, null, isReloadFyway); } public boolean startCustom() { String location = "db.performance"; -/* if (JBOSS_DATA != null) { + if (JBOSS_DATA != null) { File data = new File(JBOSS_DATA, "flyway"); if (!data.exists()) { @@ -132,13 +137,13 @@ public class FlyWay { location = "filesystem:" + data.getPath(); } -*/ - return start(location, TABELA_FLYWAY); + + return start(location, TABELA_FLYWAY, false); } - public boolean start(final String customLocation, final String customTable) { + public boolean start(final String customLocation, final String customTable, Boolean isReloadFlyway) { log.info("Executando Flyway..."); -/* + try{ final Flyway flyway = new Flyway(); @@ -159,22 +164,27 @@ public class FlyWay { dataSource = flyway.getDataSource(); } + String ambiente = System.getProperty("ambiente"); + if(!AMBIENTE_DEV.equals(ambiente) || Boolean.TRUE.equals(isReloadFlyway)) { + execute(flyway); + log.info("Flyway executado."); + }else { + log.warn("Flyway não executado. Ambiente = dev"); + } - execute(flyway); }catch(Throwable t){ log.error("Erro ao executar o Flyway",t); return false; } -*/ - log.info("Flyway executado."); + return true; } public void execute(final Flyway flyway) { -/* flyway.setValidateOnMigrate(false); + flyway.setValidateOnMigrate(false); flyway.setIgnoreFutureMigrations(true); flyway.setOutOfOrder(true); flyway.setBaselineOnMigrate(true); @@ -238,7 +248,7 @@ public class FlyWay { } else { flyway.migrate(); } -*/ } + } private boolean validarScripts(File data) { Map scripts = new HashMap(0); diff --git a/src/com/rjconsultores/ventaboletos/servlet/ReloadFlyway.java b/src/com/rjconsultores/ventaboletos/servlet/ReloadFlyway.java index 2d9d7dd2e..135e2315d 100644 --- a/src/com/rjconsultores/ventaboletos/servlet/ReloadFlyway.java +++ b/src/com/rjconsultores/ventaboletos/servlet/ReloadFlyway.java @@ -20,7 +20,7 @@ public class ReloadFlyway extends HttpServlet { out = resp.getWriter(); out.println("

Reload Flyway

"); - boolean retorno = FlyWay.getInstance().start(); + boolean retorno = FlyWay.getInstance().start(true); if (retorno) { out.print("Processo realizado com sucesso."); diff --git a/src/db/migration/V20200811_1630__jiraAL1199.sql b/src/db/migration/V20200811_1630__jiraAL1199.sql new file mode 100644 index 000000000..82a451bc7 --- /dev/null +++ b/src/db/migration/V20200811_1630__jiraAL1199.sql @@ -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 EVENTO_EXTRA ADD (PUNTOVENTASEGUNDAVIAID NUMBER(7,0)) '; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20211116_1019__mantis23634.sql b/src/db/migration/V20211116_1019__mantis23634.sql new file mode 100644 index 000000000..5bf4672e1 --- /dev/null +++ b/src/db/migration/V20211116_1019__mantis23634.sql @@ -0,0 +1,55 @@ +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 PTOVTA_COMISSAO ADD (RECARGACELULARALTA NUMBER(7,2), RECARGACELULARBAIXA NUMBER(7,2)) '; + 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 COMISSAO ADD (RECEITA_RECARGACELULAR NUMBER(12,2)) '; + 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 COMISSAO ADD (RECEITA_BRUTA_RECARGACELULAR NUMBER(12,2)) '; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; +/ +declare + dup_val_on_index exception; + pragma exception_init (dup_val_on_index , -00001); +begin + execute immediate 'INSERT INTO TIPO_OPERACION_CC (TIPOOPERACIONCC_ID, DESCTIPO, CVETIPO, INDCREDITO, ACTIVO, FECMODIF, USUARIO_ID) VALUES (7, ''COMISSAO RECARGA'', ''CR'', 1, 1, SYSDATE, 99)'; + exception when dup_val_on_index then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20211207_1433__mantis23635.sql b/src/db/migration/V20211207_1433__mantis23635.sql new file mode 100644 index 000000000..d01e168a0 --- /dev/null +++ b/src/db/migration/V20211207_1433__mantis23635.sql @@ -0,0 +1,31 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE BOLETO_CHECKIN ADD INDCHECKINBLOQUEADO NUMBER(1,0)'; + exception when column_exists then null; +end; +/ +declare +begin + execute immediate 'INSERT INTO FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,FECMODIF,USUARIO_ID) +values (FUNCION_SISTEMA_SEQ.NEXTVAL,''1'',''PERMITE BLOQUEAR/LIBERAR CHECKIN'', +''COM.RJCONSULTORES.VENTABOLETOS.GUI.VENTA.MENU.ITENS.ITEMMENUCHECKIN.CHECKINBLOQUEADO'', +1,sysdate,1)'; + exception when others then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE EMPRESA ADD INDCHECKINBLOQUEADOREMARCACAO NUMBER(1,0)'; + exception when column_exists then null; +end; +/ +declare + +begin + execute immediate 'UPDATE EMPRESA SET INDCHECKINBLOQUEADOREMARCACAO = 0 WHERE INDCHECKINBLOQUEADOREMARCACAO IS NULL'; + exception when others then null; +end; diff --git a/src/db/migration/V20211214_1829__mantis23543.sql b/src/db/migration/V20211214_1829__mantis23543.sql new file mode 100644 index 000000000..d6025fee1 --- /dev/null +++ b/src/db/migration/V20211214_1829__mantis23543.sql @@ -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 FECHAMENTO_BOLETO ADD INDBOLETOQUITADO NUMBER(1,0) '; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20211217_1221__mantis23543.sql b/src/db/migration/V20211217_1221__mantis23543.sql new file mode 100644 index 000000000..d2ae64b79 --- /dev/null +++ b/src/db/migration/V20211217_1221__mantis23543.sql @@ -0,0 +1,15 @@ +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,''VDA > AUTORIZACAO > FECHAMENTO CONTA CORRENTE > QUITAR BOLETO'',''COM.RJCONSULTORES.VENTABOLETOS.FECHAMENTOCONTACORRENTE.QUITARBOLETO'', 1, sysdate, 1)'; + + exception + when dup_val_on_index then null; + when except_02291 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20211221_1620__mantis23833.sql b/src/db/migration/V20211221_1620__mantis23833.sql new file mode 100644 index 000000000..eb7d70708 --- /dev/null +++ b/src/db/migration/V20211221_1620__mantis23833.sql @@ -0,0 +1,221 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate +'CREATE TABLE REVENUE +( + REVENUE_ID NUMBER(15) NOT NULL +, CONSTRAINT REVENUE_PK PRIMARY KEY + ( + REVENUE_ID + ) + ENABLE +, EMPRESA_ID NUMBER(7,0) +, ORIGEN_ID NUMBER(7, 0) +, DESTINO_ID NUMBER(7, 0) +, RUTA_ID NUMBER(7, 0) +, CLASESERVICIO_ID NUMBER(2, 0) +, VIA_ID NUMBER(15,0) +, FECHORVIAJE DATE +, CATEGORIA_ID NUMBER(7, 0) +, TIPOSERVICOBPE NUMBER(7,0) +, PRECIOPRATICADO NUMBER(10, 2) +, PRECIOREVENUE NUMBER(10, 2) +, PRECIOREVENUECLIENTE NUMBER(10, 2) +, REVENUEAPROVADO NUMBER(1, 0) +, JUSTIFICATIVA_ID NUMBER(15, 0) +, TIPOVENTA_ID NUMBER(2, 0) +, ACTIVO NUMBER(1, 0) +, FECMODIF DATE +, USUARIO_ID NUMBER(7, 0) +)'; + exception when object_exists then null; +end; +/ +declare + column_exists exception; + except_02275 exception; + + pragma exception_init (column_exists , -01430); + pragma exception_init (column_exists , -02275); +begin + execute immediate 'ALTER TABLE REVENUE +ADD CONSTRAINT REVENUE_EMP_FK FOREIGN KEY +( + EMPRESA_ID +) +REFERENCES EMPRESA +( + EMPRESA_ID +) +ENABLE'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + except_02275 exception; + + pragma exception_init (column_exists , -01430); + pragma exception_init (column_exists , -02275); +begin + execute immediate 'ALTER TABLE REVENUE +ADD CONSTRAINT REVENUE_ORIGEN_FK FOREIGN KEY +( + ORIGEN_ID +) +REFERENCES PARADA +( + PARADA_ID +) +ENABLE'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + except_02275 exception; + + pragma exception_init (column_exists , -01430); + pragma exception_init (column_exists , -02275); +begin + execute immediate 'ALTER TABLE REVENUE +ADD CONSTRAINT REVENUE_DESTINO_FK FOREIGN KEY +( + DESTINO_ID +) +REFERENCES PARADA +( + PARADA_ID +) +ENABLE'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + except_02275 exception; + + pragma exception_init (column_exists , -01430); + pragma exception_init (column_exists , -02275); +begin + execute immediate 'ALTER TABLE REVENUE +ADD CONSTRAINT REVENUE_CLASE_FK FOREIGN KEY +( + CLASESERVICIO_ID +) +REFERENCES CLASE_SERVICIO +( + CLASESERVICIO_ID +) +ENABLE'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + except_02275 exception; + + pragma exception_init (column_exists , -01430); + pragma exception_init (column_exists , -02275); +begin + execute immediate 'ALTER TABLE REVENUE +ADD CONSTRAINT REVENUE_CATEGORIA_FK FOREIGN KEY +( + CATEGORIA_ID +) +REFERENCES CATEGORIA +( + CATEGORIA_ID +) +ENABLE'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + except_02275 exception; + + pragma exception_init (column_exists , -01430); + pragma exception_init (column_exists , -02275); +begin + execute immediate 'ALTER TABLE REVENUE +ADD CONSTRAINT REVENUE_TIPOVENTA_FK FOREIGN KEY +( + TIPOVENTA_ID +) +REFERENCES TIPO_VENTA +( + TIPOVENTA_ID +) +ENABLE'; + exception when column_exists then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate +'CREATE TABLE REVENUE_JUSTIFICATIVA +( + JUSTIFICATIVA_ID NUMBER(15) NOT NULL +, CONSTRAINT JUSTIFICATIVA_PK PRIMARY KEY + ( + JUSTIFICATIVA_ID + ) + ENABLE +, DESCJUSTIFICATIVA VARCHAR2(255 BYTE) +, ACTIVO NUMBER(1, 0) +, FECMODIF DATE +, USUARIO_ID NUMBER(7, 0) +)'; + exception when object_exists then null; +end; +/ +declare + column_exists exception; + except_02275 exception; + + pragma exception_init (column_exists , -01430); + pragma exception_init (column_exists , -02275); +begin + execute immediate 'ALTER TABLE REVENUE +ADD CONSTRAINT REVENUE_JUSTIFICAIVA_FK FOREIGN KEY +( + JUSTIFICATIVA_ID +) +REFERENCES REVENUE_JUSTIFICATIVA +( + JUSTIFICATIVA_ID +) +ENABLE'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE BOLETO ADD (INDREVENUE NUMBER(1) )'; + exception when column_exists then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE SEQUENCE REVENUE_SEQ MINVALUE 1 MAXVALUE 9999999 INCREMENT BY 1'; + exception when object_exists then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE SEQUENCE REVENUE_JUSTIFICAIVA_SEQ'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20211227_1823__mantis23833.sql b/src/db/migration/V20211227_1823__mantis23833.sql new file mode 100644 index 000000000..4204807e7 --- /dev/null +++ b/src/db/migration/V20211227_1823__mantis23833.sql @@ -0,0 +1,16 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE BOLETO ADD (REVENUE_ID NUMBER(15))'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CAJA ADD (REVENUE_ID NUMBER(15))'; + exception when column_exists then null; +end; +/ \ No newline at end of file diff --git a/src/db/migration/V20220107_1114__mantis23978.sql b/src/db/migration/V20220107_1114__mantis23978.sql new file mode 100644 index 000000000..12b2479c5 --- /dev/null +++ b/src/db/migration/V20220107_1114__mantis23978.sql @@ -0,0 +1,8 @@ +declare + dup_val_on_index exception; + pragma exception_init (dup_val_on_index , -00001); +begin + execute immediate 'INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, ''IS_NAO_RETORNA_ITEM_COMPRA_CONS_CORRIDA'', ''IS_NAO_RETORNA_ITEM_COMPRA_CONS_CORRIDA'', ''-1'', ''1'', ''1'', ''1'', sysdate, ''1'')'; + exception when dup_val_on_index then null; +end; diff --git a/src/db/migration/V20220121_1053__mantis24036.sql b/src/db/migration/V20220121_1053__mantis24036.sql new file mode 100644 index 000000000..5489807d5 --- /dev/null +++ b/src/db/migration/V20220121_1053__mantis24036.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE PUNTO_VENTA ADD (INDBLOQCANCBILHETEIMPRESSO NUMBER(1,0))'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220127_1114__mantis23993.sql b/src/db/migration/V20220127_1114__mantis23993.sql new file mode 100644 index 000000000..973f80713 --- /dev/null +++ b/src/db/migration/V20220127_1114__mantis23993.sql @@ -0,0 +1,8 @@ +declare + dup_val_on_index exception; + pragma exception_init (dup_val_on_index , -00001); +begin + execute immediate 'INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, ''MAXIMO_DIAS_UMA_VIAGEM_EMPRESA'', ''MAXIMO_DIAS_UMA_VIAGEM_EMPRESA'', ''-1'', ''1'', ''1'', ''1'', sysdate, ''1'')'; + exception when dup_val_on_index then null; +end; diff --git a/src/db/migration/V20220131_1201__mantis23939.sql b/src/db/migration/V20220131_1201__mantis23939.sql new file mode 100644 index 000000000..eaf2da73e --- /dev/null +++ b/src/db/migration/V20220131_1201__mantis23939.sql @@ -0,0 +1,11 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'alter table ocd add(NUMTARJETA_DEB VARCHAR2(48 BYTE), +NUMAUTORIZACION_DEB VARCHAR2(45 BYTE), +NSU_DEB VARCHAR2(18 BYTE), +VALOR_TARJETA_DEB NUMBER(7,2), +VALOR_DEVOLVIDO_EM_DINHEIRO NUMBER(7,2) )'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220201_1048__mantis24050.sql b/src/db/migration/V20220201_1048__mantis24050.sql new file mode 100644 index 000000000..ac02c7433 --- /dev/null +++ b/src/db/migration/V20220201_1048__mantis24050.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE ESQUEMA_CORRIDA ADD (HORASALIDA_EXTRA DATE)'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220201_1756__mantis24059.sql b/src/db/migration/V20220201_1756__mantis24059.sql new file mode 100644 index 000000000..7057afa27 --- /dev/null +++ b/src/db/migration/V20220201_1756__mantis24059.sql @@ -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 > RELATORIOS > INTEGRACAO > RETORNO BANCARIO'', + ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIORETORNOBANCARIO'', 1, SYSDATE, 1)'; + + exception + when dup_val_on_index then null; + when except_02291 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220202_1120__mantis24085.sql b/src/db/migration/V20220202_1120__mantis24085.sql new file mode 100644 index 000000000..b3319af8e --- /dev/null +++ b/src/db/migration/V20220202_1120__mantis24085.sql @@ -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,2,''VDA > CAIXA > CONSULTA DE BILHETES > LANÇAR RECEITA/DESPESA'',''COM.RJCONSULTORES.VENTABOLETOS.GUI.CONSULTABOLETO.LANCARRECEITADESPESA'',1,sysdate,1)'; + exception + when dup_val_on_index then null; + when except_02291 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220204_1758__mantis23939.sql b/src/db/migration/V20220204_1758__mantis23939.sql new file mode 100644 index 000000000..2a29c0d50 --- /dev/null +++ b/src/db/migration/V20220204_1758__mantis23939.sql @@ -0,0 +1,17 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'alter table ocd_param add(INDOCDFORMAPAGAMENTO NUMBER(1,0))'; + exception when column_exists then null; +end; +/ + +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'UPDATE ocd_param SET INDOCDFORMAPAGAMENTO=0'; + exception when object_exists then null; +end; +/ diff --git a/src/db/migration/V20220208_1729__mantis24059.sql b/src/db/migration/V20220208_1729__mantis24059.sql new file mode 100644 index 000000000..ae84cbdae --- /dev/null +++ b/src/db/migration/V20220208_1729__mantis24059.sql @@ -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 FECHAMENTO_BOLETO ADD USUARIO_ID_QUITA NUMBER(7,0)'; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220211_1521__mantis24054.sql b/src/db/migration/V20220211_1521__mantis24054.sql new file mode 100644 index 000000000..be1d60e27 --- /dev/null +++ b/src/db/migration/V20220211_1521__mantis24054.sql @@ -0,0 +1,8 @@ +declare + dup_val_on_index exception; + pragma exception_init (dup_val_on_index , -00001); +begin + execute immediate 'INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, ''IMPRIMETARJETAINTERNACIONAL'', ''DEFINE OS PAISES QUE UTILIZAM A IMPRESSAO DE TARJETA INTERNACIONAL, IDs SEPARADOS POR VIRGULA'', null, ''1'', ''1'', ''1'', sysdate, ''1'')'; + exception when dup_val_on_index then null; +end; diff --git a/src/db/migration/V20220222_1512__mantis24160.sql b/src/db/migration/V20220222_1512__mantis24160.sql new file mode 100644 index 000000000..123a71b31 --- /dev/null +++ b/src/db/migration/V20220222_1512__mantis24160.sql @@ -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 EMPRESA ADD INDAGRUPLOCCONEXAO NUMBER(1,0)'; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 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 > RELATORIOS > OPERACIONAIS >> RELATORIO IRK'', + ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOIRK'', 1, + SYSDATE, -1)'; + exception + when dup_val_on_index then null; + when except_02291 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220304_0909__mantis24126.sql b/src/db/migration/V20220304_0909__mantis24126.sql new file mode 100644 index 000000000..f4d895ac4 --- /dev/null +++ b/src/db/migration/V20220304_0909__mantis24126.sql @@ -0,0 +1,8 @@ +declare + dup_val_on_index exception; + pragma exception_init (dup_val_on_index , -00001); +begin + execute immediate 'INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, ''AUTOCOMPLETECUPOMDESCONTO'', ''DEFINE SE O SISTEMA REALIZA O AUTOCOMPLETE DOS CUPOMS DE DESCONTO'', ''true'', ''1'', ''1'', ''1'', sysdate, ''1'')'; + exception when dup_val_on_index then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220309_1748__mantis24061.sql b/src/db/migration/V20220309_1748__mantis24061.sql new file mode 100644 index 000000000..8e6e221af --- /dev/null +++ b/src/db/migration/V20220309_1748__mantis24061.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE EMPRESA ADD INDLIMITACATEGORIAPORCORRIDA NUMBER(1,0)'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220316_1600__mantis24139.sql b/src/db/migration/V20220316_1600__mantis24139.sql new file mode 100644 index 000000000..eaf357c40 --- /dev/null +++ b/src/db/migration/V20220316_1600__mantis24139.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE PARADA ADD INDINTEGRACAOW2I NUMBER(1,0)'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220317_1055__mantis24260.sql b/src/db/migration/V20220317_1055__mantis24260.sql new file mode 100644 index 000000000..eb6120e91 --- /dev/null +++ b/src/db/migration/V20220317_1055__mantis24260.sql @@ -0,0 +1,8 @@ +declare + dup_val_on_index exception; + pragma exception_init (dup_val_on_index , -00001); +begin + execute immediate 'INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, ''MIN_CONSULTA_CORRIDA_AGRUPACION'', ''MIN_CONSULTA_CORRIDA_AGRUPACION'', '''', ''1'', ''1'', ''1'', sysdate, ''1'')'; + exception when dup_val_on_index then null; +end; diff --git a/src/db/migration/V20220318_1005__mantis24167.sql b/src/db/migration/V20220318_1005__mantis24167.sql new file mode 100644 index 000000000..b8ef06f57 --- /dev/null +++ b/src/db/migration/V20220318_1005__mantis24167.sql @@ -0,0 +1,17 @@ +declare + dup_val_on_index exception; + pragma exception_init (dup_val_on_index , -00001); +begin + execute immediate 'INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, ''TIMEOUT_BPE'', ''TIMEOUT_BPE'', ''300'', ''1'', ''1'', ''1'', sysdate, ''1'')'; + exception when dup_val_on_index 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, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, ''TRATAR_STATUS_539'', ''TRATAR_STATUS_539'', ''false'', ''1'', ''1'', ''1'', sysdate, ''1'')'; + exception when dup_val_on_index then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220318_1011__mantis24167.sql b/src/db/migration/V20220318_1011__mantis24167.sql new file mode 100644 index 000000000..51ffb3646 --- /dev/null +++ b/src/db/migration/V20220318_1011__mantis24167.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE BPE ADD (CHBPE_ORIGINAL VARCHAR2(44 BYTE))'; + exception when column_exists then null; +end; diff --git a/src/db/migration/V20220321_1121__mantis24091.sql b/src/db/migration/V20220321_1121__mantis24091.sql new file mode 100644 index 000000000..5d62abde1 --- /dev/null +++ b/src/db/migration/V20220321_1121__mantis24091.sql @@ -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 > RELATORIOS > INTEGRACAO > CT-e OS'', + ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOCTEOS'', 1, SYSDATE, 1)'; + + exception + when dup_val_on_index then null; + when except_02291 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220322_1055__mantis24167.sql b/src/db/migration/V20220322_1055__mantis24167.sql new file mode 100644 index 000000000..07481a89e --- /dev/null +++ b/src/db/migration/V20220322_1055__mantis24167.sql @@ -0,0 +1,8 @@ +declare + dup_val_on_index exception; + pragma exception_init (dup_val_on_index , -00001); +begin + execute immediate 'INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, ''TRATAR_STATUS_204'', ''TRATAR_STATUS_204'', ''false'', ''1'', ''1'', ''1'', sysdate, ''1'')'; + exception when dup_val_on_index then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220323_1923__mantis23834.sql b/src/db/migration/V20220323_1923__mantis23834.sql new file mode 100644 index 000000000..4dfa37274 --- /dev/null +++ b/src/db/migration/V20220323_1923__mantis23834.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE REVENUE ADD (CORRIDA_ID NUMBER(7) )'; + exception when column_exists then null; +end; diff --git a/src/db/migration/V20220330_0813__mantis24313.sql b/src/db/migration/V20220330_0813__mantis24313.sql new file mode 100644 index 000000000..6b2e4e88e --- /dev/null +++ b/src/db/migration/V20220330_0813__mantis24313.sql @@ -0,0 +1,44 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE TABLE AJUSTE_CAJA_LOG ( + AJUSTECAJALOG_ID NUMBER(15) NOT NULL, + CAJA_ID NUMBER(15) NULL, + IND_CAJA NUMBER(1) NULL, + IND_CAJA_FP NUMBER(1) NULL, + USUARIO_ID NUMBER(7) NULL, + ACTIVO NUMBER(1) NULL, + FECMODIF DATE NULL, + PRIMARY KEY (AJUSTECAJALOG_ID) + )'; + exception when object_exists then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE SEQUENCE AJUSTE_CAJA_LOG_SEQ MINVALUE 1 MAXVALUE 999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE'; + exception when object_exists then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE INDEX IDX_CAJA_AJ_LOG ON AJUSTE_CAJA_LOG (CAJA_ID)'; + exception when object_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, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, ''PERMITE_AJUSTE_CAIXA_ANTES_FECHAMENTO'', ''PERMITE AJUSTE DO CAIXA ANTES DO FECHAMENTO'', ''false'', ''1'', ''1'', ''1'', sysdate, ''1'')'; + exception when dup_val_on_index then null; +end; diff --git a/src/db/migration/V20220404_1432__mantis23872.sql b/src/db/migration/V20220404_1432__mantis23872.sql new file mode 100644 index 000000000..04bc3cddb --- /dev/null +++ b/src/db/migration/V20220404_1432__mantis23872.sql @@ -0,0 +1,8 @@ +declare + dup_val_on_index exception; + pragma exception_init (dup_val_on_index , -00001); +begin + execute immediate 'INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, ''CHAR_9_IMPRES_BLINDADA'', ''CHAR_9_IMPRESORA_BLINDADA'', ''FALSE'', ''1'', ''1'', ''1'', sysdate, ''1'')'; + exception when dup_val_on_index then null; +end; diff --git a/src/db/migration/V20220407_0921__mantis24128.sql b/src/db/migration/V20220407_0921__mantis24128.sql new file mode 100644 index 000000000..b32af8f6e --- /dev/null +++ b/src/db/migration/V20220407_0921__mantis24128.sql @@ -0,0 +1,26 @@ +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 > RELATORIOS > RELATORIOS > RELATORIOS BPe > Bpe Substituido'', + ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOBPESUBSTITUIDO'', 1, SYSDATE, 1)'; + + exception + when dup_val_on_index then null; + when except_02291 then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'update FUNCION_SISTEMA set NOMBFUNCION = ''ADM > RELATORIOS > RELATORIOS > RELATORIOS BPe > BPe'' + WHERE DESCRUTA = ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.RELATORIO.BPE'''; +end; +/ \ No newline at end of file diff --git a/src/db/migration/V20220418_1522__mantis24373.sql b/src/db/migration/V20220418_1522__mantis24373.sql new file mode 100644 index 000000000..7cbfe2afb --- /dev/null +++ b/src/db/migration/V20220418_1522__mantis24373.sql @@ -0,0 +1,38 @@ +declare + dup_val_on_index exception; + pragma exception_init (dup_val_on_index , -00001); +begin + execute immediate 'INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, ''REMOVE_LOC_CONEXAO_LINHA'', ''REMOVE LOCALIDADE CONEXAO ENTRE LINHAS'', ''FALSE'', ''1'', ''1'', ''1'', sysdate, ''1'')'; + exception when dup_val_on_index then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE SEQUENCE CONEXION_RUTA_LOC_REMOVIDA_SEQ MINVALUE 1 MAXVALUE 9999999 INCREMENT BY 1 START WITH 101 CACHE 20 NOORDER NOCYCLE'; + exception when object_exists then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate +'CREATE TABLE CONEXION_RUTA_LOC_REMOVIDA + (CONEXIONRUTALOCREMOVIDA_ID NUMBER(7,0) NOT NULL ENABLE, + CONEXIONRUTACONF_ID NUMBER(7,0), + PARADA_ID NUMBER(7,0), + ACTIVO NUMBER(1,0), + FECMODIF DATE, + USUARIO_ID NUMBER(7,0), + PRIMARY KEY (CONEXIONRUTALOCREMOVIDA_ID) ENABLE, + CONSTRAINT FK_USU_ID_CONEX_RUTA_LOC_REM FOREIGN KEY (USUARIO_ID) REFERENCES USUARIO (USUARIO_ID), + CONSTRAINT FK_CONRUTACONFID_CONEXRULOCREM FOREIGN KEY (CONEXIONRUTACONF_ID) REFERENCES CONEXION_RUTA_CONF (CONEXIONRUTACONF_ID), + CONSTRAINT FK_PARADA_ID_CONEXRUTALOCREM FOREIGN KEY (PARADA_ID) REFERENCES PARADA (PARADA_ID) + )'; + exception when object_exists then null; +end; +/ \ No newline at end of file diff --git a/src/db/migration/V20220420_1711__mantis24168.sql b/src/db/migration/V20220420_1711__mantis24168.sql new file mode 100644 index 000000000..b91e2fc7d --- /dev/null +++ b/src/db/migration/V20220420_1711__mantis24168.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CLASE_SERVICIO ADD (DESCONTO_MONITRIP VARCHAR2(30))'; + exception when column_exists then null; +end; diff --git a/src/db/migration/V20220425_1058__mantis24117.sql b/src/db/migration/V20220425_1058__mantis24117.sql new file mode 100644 index 000000000..62c313e43 --- /dev/null +++ b/src/db/migration/V20220425_1058__mantis24117.sql @@ -0,0 +1,53 @@ +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,''MP00_URL_API_MOBIPIX'',''MOBIPIX. URL base da API.'',1, ''https://qa.api.mobipix.com.br/api/rodosoft'',1,1,null,1)'; + exception when dup_val_on_index 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,''MP01_MOBIPIX_API_ID'',''MOBIPIX. api ID'',1, ''762c3f9d-ecd4-4dfe-9c2d-09d9564caa0a'',1,1,null,1)'; + exception when dup_val_on_index 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,''MP02_MOBIPIX_API_KEY'',''MOBIPIX. API KEY'',1, ''762c3f9d-ecd4-4dfe-9c2d-09d9564caa0a'',1,1,null,1)'; + exception when dup_val_on_index 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,''MP03_PATH_AUTENTICACAO_MOBIPIX'',''MOBIPIX. url de autenticacao.'',1, ''/auth/pos'',1,1,null,1)'; + exception when dup_val_on_index 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,''MP04_PATH_PAGAMENTO_MOBIPIX'',''MOBIPIX. url de pagamento.'',1, ''/transactions'',1,1,null,1)'; + exception when dup_val_on_index 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,''MP05_PATH_ESTORNO_MOBIPIX'',''MOBIPIX. url de estorno.'',1, ''/transactions'',1,1,null,1)'; + exception when dup_val_on_index then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220427_1051__mantis20900.sql b/src/db/migration/V20220427_1051__mantis20900.sql new file mode 100644 index 000000000..90bb302a5 --- /dev/null +++ b/src/db/migration/V20220427_1051__mantis20900.sql @@ -0,0 +1,7 @@ +declare +begin + execute immediate 'INSERT INTO FUNCION_SISTEMA (FUNCIONSISTEMA_ID, SISTEMA_ID, NOMBFUNCION, DESCRUTA, ACTIVO, FECMODIF, USUARIO_ID) + VALUES(FUNCION_SISTEMA_SEQ.nextval, 1, ''ADM > SEGURANCA > EMBARCADA API'', ''COM.RJCONSULTORES.ADMINISTRACION.GUI.SEGURIDAD.MENU.RECARREGARCACHEEMBARCADASINCRONIZACAOAPI'', 1, NULL, 1)'; + exception when others then null; +end; +/ diff --git a/src/db/migration/V20220428_1611__mantis24456.sql b/src/db/migration/V20220428_1611__mantis24456.sql new file mode 100644 index 000000000..a753150f9 --- /dev/null +++ b/src/db/migration/V20220428_1611__mantis24456.sql @@ -0,0 +1,16 @@ +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, ''EBUS > MENU >> REVENUE'', + ''COM.RJCONSULTORES.EBUS.GUI.MENU.REVENUE'', 1, + SYSDATE, -1)'; + exception + when dup_val_on_index then null; + when except_02291 then null; +end; +/ \ No newline at end of file diff --git a/src/db/migration/V20220504_1508__mantis24368.sql b/src/db/migration/V20220504_1508__mantis24368.sql new file mode 100644 index 000000000..25ba6ffdb --- /dev/null +++ b/src/db/migration/V20220504_1508__mantis24368.sql @@ -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 ESQUEMA_CORRIDA ADD (INDBLOQUEIAWEBAPOSSAIDA NUMBER(1,0)) '; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220505_1655__mantis24409.sql b/src/db/migration/V20220505_1655__mantis24409.sql new file mode 100644 index 000000000..6d7f6b8f0 --- /dev/null +++ b/src/db/migration/V20220505_1655__mantis24409.sql @@ -0,0 +1,26 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE SEQUENCE CONFTOTEM_VENTARAPIDA_SEQ MINVALUE 1 MAXVALUE 9999999 INCREMENT BY 1 START WITH 101 CACHE 20 NOORDER NOCYCLE'; + exception when object_exists then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate +'CREATE TABLE CONF_TOTEM_VENTARAPIDA + (CONFTOTEMVENTARAPIDA_ID NUMBER(7,0) NOT NULL ENABLE, + ACTIVO NUMBER(1,0), + FECMODIF DATE, + USUARIO_ID NUMBER(7,0), + ORIGEN_ID NUMBER(7,0), + DESTINO_ID NUMBER(7,0), + PRIMARY KEY (CONFTOTEMVENTARAPIDA_ID) ENABLE + )'; + exception when object_exists then null; +end; + diff --git a/src/db/migration/V20220520_1819__mantis24537.sql b/src/db/migration/V20220520_1819__mantis24537.sql new file mode 100644 index 000000000..518d4693f --- /dev/null +++ b/src/db/migration/V20220520_1819__mantis24537.sql @@ -0,0 +1,6 @@ +declare +begin + execute immediate 'INSERT INTO TIPO_VENTA (TIPOVENTA_ID, DESCTIPOVENTA, ACTIVO, FECMODIF, USUARIO_ID) VALUES (16, ''TPV RESERVACION INTERNET'', 1, SYSDATE, 1)'; + exception when others then null; +end; +/ diff --git a/src/db/migration/V20220608_1022__mantis24539.sql b/src/db/migration/V20220608_1022__mantis24539.sql new file mode 100644 index 000000000..97acdc623 --- /dev/null +++ b/src/db/migration/V20220608_1022__mantis24539.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO ADD (INDEXIGENUMFIDELIDADE NUMBER(1,0) )'; + exception when column_exists then null; +end; diff --git a/src/db/migration/V20220610_1511__jira23.sql b/src/db/migration/V20220610_1511__jira23.sql new file mode 100644 index 000000000..4434cdcc5 --- /dev/null +++ b/src/db/migration/V20220610_1511__jira23.sql @@ -0,0 +1,11 @@ +declare + object_exists exception; + except_00957 exception; + pragma exception_init (object_exists , -01430); + pragma exception_init (except_00957 , -00957); +begin + execute immediate 'ALTER TABLE GP_PRICING ADD (VALOREXTRA NUMBER(7,2) )'; + exception + when object_exists then null; + when except_00957 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V202206122_1522__mantis24590.sql b/src/db/migration/V202206122_1522__mantis24590.sql new file mode 100644 index 000000000..5a6b44f97 --- /dev/null +++ b/src/db/migration/V202206122_1522__mantis24590.sql @@ -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 ORGAO_CANCELACION ADD INDIMPRIMECOMPROVANTETRANSFERENCIA NUMBER(1)'; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220614_1101__mantis24629.sql b/src/db/migration/V20220614_1101__mantis24629.sql new file mode 100644 index 000000000..b4cb1616b --- /dev/null +++ b/src/db/migration/V20220614_1101__mantis24629.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -01430); +begin + execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO ADD TIPOOCUPACION_ID NUMBER(7,0)'; + exception when object_exists then null; +end; diff --git a/src/db/migration/V20220614_1509__mantis24629.sql b/src/db/migration/V20220614_1509__mantis24629.sql new file mode 100644 index 000000000..1197639a6 --- /dev/null +++ b/src/db/migration/V20220614_1509__mantis24629.sql @@ -0,0 +1,6 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'Insert into TIPO_OCUPACION (TIPOOCUPACION_ID,CVETIPOOCUPACION,DESCTIPO,EQUIVALENCIA_ID,ACTIVO,FECMODIF,USUARIO_ID) values (TIPO_OCUPACION_SEQ.nextval, null,''POLICIAL MILITAR'',null,1,sysdate,1)'; +end; \ No newline at end of file diff --git a/src/db/migration/V20220621_0932__mantis24679.sql b/src/db/migration/V20220621_0932__mantis24679.sql new file mode 100644 index 000000000..2343cbf5d --- /dev/null +++ b/src/db/migration/V20220621_0932__mantis24679.sql @@ -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 > PASAJERO FRECUENTE > IMPORTAR CLIENTES POLICIAL'', ''COM.RJCONSULTORES.ADMINISTRACION.GUI.PASAJEROFRECUENTE.MENU.IMPORTARCLIENTESPOLICIAL'',1,SYSDATE,-1)'; + exception + when dup_val_on_index then null; + when except_02291 then null; +end; +/ \ No newline at end of file diff --git a/src/db/migration/V20220621_1520__mantis24573.sql b/src/db/migration/V20220621_1520__mantis24573.sql new file mode 100644 index 000000000..6760c2763 --- /dev/null +++ b/src/db/migration/V20220621_1520__mantis24573.sql @@ -0,0 +1,123 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'CREATE SEQUENCE "MACON_VDA_SEQ" INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE'; + exception when object_exists then null; +end; +/ + +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'CREATE SEQUENCE "MACON_VDA_MANUAL_SEQ" INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE'; + exception when object_exists then null; +end; +/ + +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE BOLETO ADD (NUM_MACON VARCHAR2(9))'; + exception when column_exists then null; +end; +/ + +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE BOLETO ADD (NUMSERIE_MACON VARCHAR2(4))'; + exception when column_exists then null; +end; +/ + +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate +'CREATE TABLE CTRL_SERIE_MACON +( + CTRLSERIEMACON_ID NUMBER(7) NOT NULL +, NUMSERIE VARCHAR2(4) NOT NULL +, EMPRESA_ID NUMBER(7) +, FECMODIF DATE +, USUARIO_ID NUMBER(7) +, ACTIVO NUMBER(1) +, CONSTRAINT CTRL_SERIE_MACON_PK PRIMARY KEY + ( + CTRLSERIEMACON_ID + ) + ENABLE +)'; + exception when object_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CAJA ADD (NUM_MACON VARCHAR2(9))'; + exception when column_exists then null; +end; +/ + +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CAJA ADD (NUMSERIE_MACON VARCHAR2(4))'; + exception when column_exists then null; +end; +/ + +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'CREATE SEQUENCE "MACON_CANCEL_SEQ" INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE'; + exception when object_exists then null; +end; +/ + +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'CREATE SEQUENCE "MACON_SEQ" INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE'; + exception when object_exists then null; +end; +/ + +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate +'CREATE TABLE MACON +( + MACON_ID NUMBER(7) NOT NULL +, BOLETO_ID NUMBER(15) +, INVOICEDATE VARCHAR2(20) +, SYSTEMENTRYDATE VARCHAR2(20) +, INVOICENO VARCHAR2(20) +, GROSSTOTAL NUMBER(10,2) +, HASH VARCHAR2(172) +, EMPRESA_ID NUMBER(7) +, FECMODIF DATE +, USUARIO_ID NUMBER(7) +, ACTIVO NUMBER(1) +, CONSTRAINT MACON_PK PRIMARY KEY + ( + MACON_ID + ) + ENABLE +)'; + exception when object_exists then null; +end; +/ + + diff --git a/src/db/migration/V20220624_1043__mantis24642.sql b/src/db/migration/V20220624_1043__mantis24642.sql new file mode 100644 index 000000000..906fb6a9b --- /dev/null +++ b/src/db/migration/V20220624_1043__mantis24642.sql @@ -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 EVENTO_EXTRA ADD (INDSEGUNDAVIAIMPRESSA NUMBER(1,0), FECSEGUNDAVIA DATE) '; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220630_0923__mantis24642.sql b/src/db/migration/V20220630_0923__mantis24642.sql new file mode 100644 index 000000000..a321095fe --- /dev/null +++ b/src/db/migration/V20220630_0923__mantis24642.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE EMPRESA ADD INDSEGUNDAVIASEGOPCIONAL NUMBER(1,0)'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220707_0927__mantis24591.sql b/src/db/migration/V20220707_0927__mantis24591.sql new file mode 100644 index 000000000..76bf7a24f --- /dev/null +++ b/src/db/migration/V20220707_0927__mantis24591.sql @@ -0,0 +1,8 @@ +declare + +begin + execute immediate 'ALTER TABLE ORGAO_CANCELACION RENAME COLUMN INDIMPRIMECOMPROVANTETRANSFERENCIA TO INDIMPRIMECOMPROVANTETRANS'; + exception + when others then null; + +end; \ No newline at end of file diff --git a/src/db/migration/V202207114_1522__mantis24787.sql b/src/db/migration/V202207114_1522__mantis24787.sql new file mode 100644 index 000000000..986383b12 --- /dev/null +++ b/src/db/migration/V202207114_1522__mantis24787.sql @@ -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 ORGAO_CANCELACION ADD INDIMPRIMECOMPROVANTETRANS NUMBER(1)'; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220712_1720__mantis24765.sql b/src/db/migration/V20220712_1720__mantis24765.sql new file mode 100644 index 000000000..0ef2ec451 --- /dev/null +++ b/src/db/migration/V20220712_1720__mantis24765.sql @@ -0,0 +1,7 @@ +declare +begin + execute immediate 'INSERT INTO funcion_sistema VALUES (funcion_sistema_seq.NEXTVAL, 1, ''ADM > RELATORIOS > RELATORIOS > RELATORIOS ESTATISTICO > PASSAGENS AGER'', + ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOPASSAGENSAGER'', 1, SYSDATE, 1)'; + exception when others then null; +end; + diff --git a/src/db/migration/V20220714_1132__mantis24659.sql b/src/db/migration/V20220714_1132__mantis24659.sql new file mode 100644 index 000000000..14fec7167 --- /dev/null +++ b/src/db/migration/V20220714_1132__mantis24659.sql @@ -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,''VDA > VENDA > PERMITE PAGAMENTO MULTA CANCELAMENTO ANTECIPADA AO ESTORNO'', ''COM.RJCONSULTORES.SCO.VENTABOLETOS.CANCELACION.PERMITEPAGAMULTAANTECIPADAAOESTORNO'',1,SYSDATE,-1)'; + exception + when dup_val_on_index then null; + when except_02291 then null; +end; +/ \ No newline at end of file diff --git a/src/db/migration/V20220715_0921__mantis24733.sql b/src/db/migration/V20220715_0921__mantis24733.sql new file mode 100644 index 000000000..b2be7707f --- /dev/null +++ b/src/db/migration/V20220715_0921__mantis24733.sql @@ -0,0 +1,27 @@ +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 > RELATORIOS > RELATORIOS > RELATORIOS FINANCEIRO > FECHAMENTO CNT > BOLETOS'', + ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.CONTACORRENTE.RELATORIOBOLETOS'', 1, SYSDATE, 1)'; + + exception + when dup_val_on_index then null; + when except_02291 then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'update FUNCION_SISTEMA set NOMBFUNCION = ''ADM > RELATORIOS > RELATORIOS > RELATORIOS FINANCEIRO > FECHAMENTO CNT > DEPÓSITOS'' + ,DESCRUTA = ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.CONTACORRENTE.RELATORIODEPOSITOS'' + WHERE DESCRUTA = ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIODEPOSITOS'''; +end; +/ \ No newline at end of file diff --git a/src/db/migration/V20220715_1529__mantis24659.sql b/src/db/migration/V20220715_1529__mantis24659.sql new file mode 100644 index 000000000..ffa9dd19d --- /dev/null +++ b/src/db/migration/V20220715_1529__mantis24659.sql @@ -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 ORGAO_CANCELACION ADD (INDPERMPAGMULTAPREESTORNO NUMBER(1) )'; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; diff --git a/src/db/migration/V20220719_1115__mantis24711.sql b/src/db/migration/V20220719_1115__mantis24711.sql new file mode 100644 index 000000000..4ee47221e --- /dev/null +++ b/src/db/migration/V20220719_1115__mantis24711.sql @@ -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 PUNTO_VENTA MODIFY TIEMPOCANCELACION NUMBER(5,0)'; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220722_0820__mantis24678.sql b/src/db/migration/V20220722_0820__mantis24678.sql new file mode 100644 index 000000000..f65abe0fe --- /dev/null +++ b/src/db/migration/V20220722_0820__mantis24678.sql @@ -0,0 +1,28 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE TABLE PTOVTA_EXCECAO_MULTA_CANC ( + PTOVTAEXCECAOMULTACANC_ID NUMBER(7) NOT NULL, + PUNTOVENTA_ID NUMBER(7) NOT NULL, + EMPRESA_ID NUMBER(7) NOT NULL, + ORGAOCONCEDENTE_ID NUMBER(7) NOT NULL, + FECMODIF DATE NULL, + ACTIVO NUMBER(1) NULL, + USUARIO_ID NUMBER(7) NULL, + PRIMARY KEY (PTOVTAEXCECAOMULTACANC_ID), + FOREIGN KEY (EMPRESA_ID) REFERENCES EMPRESA, + FOREIGN KEY (PUNTOVENTA_ID) REFERENCES PUNTO_VENTA, + FOREIGN KEY (ORGAOCONCEDENTE_ID) REFERENCES ORGAO_CONCEDENTE + )'; + exception when object_exists then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'CREATE SEQUENCE PTOVTA_EXCECAO_MULTA_CANC_SEQ INCREMENT BY 1 START WITH 1 MAXVALUE 9999999 MINVALUE 1 NOCYCLE CACHE 20 NOORDER'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220725_1721__mantis24734.sql b/src/db/migration/V20220725_1721__mantis24734.sql new file mode 100644 index 000000000..2c5c04fee --- /dev/null +++ b/src/db/migration/V20220725_1721__mantis24734.sql @@ -0,0 +1,8 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE FECHAMENTO_BOLETO ADD (VALOR_JUROS NUMBER(7,2) , FECBAIXA DATE )'; + exception when column_exists then null; +end; +/ \ No newline at end of file diff --git a/src/db/migration/V20220805_1120__mantis24770.sql b/src/db/migration/V20220805_1120__mantis24770.sql new file mode 100644 index 000000000..c56f6146e --- /dev/null +++ b/src/db/migration/V20220805_1120__mantis24770.sql @@ -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 CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, ''PERMITE_CONVENIO_DESCONTO_CONFIRMACAO'', ''DEFINE SE O SISTEMA PERMITE CALCULAR O DESCONTO NA CONFIRMAÇÃO VIA API'', ''FALSE'', ''1'', ''1'', ''1'', sysdate, ''1'')'; + + exception + when dup_val_on_index then null; + when except_02291 then null; +end; diff --git a/src/db/migration/V20220810_1529__jiraAL1185.sql b/src/db/migration/V20220810_1529__jiraAL1185.sql new file mode 100644 index 000000000..7d12b6703 --- /dev/null +++ b/src/db/migration/V20220810_1529__jiraAL1185.sql @@ -0,0 +1,52 @@ +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,''2'',''VDA > VENDAS >> PERMITE DESABILITAR BOTAO CONFIRMACAO'',''COM.RJCONSULTORES.VENTABOLETOS.GUI.VENTA.PASSAGEIROS.BTN.PERMITEDESABILITARBTNCONFIRMACAO'',''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,''2'',''VDA > VENDAS >> PERMITE DESABILITAR BOTAO INFO'',''COM.RJCONSULTORES.VENTABOLETOS.GUI.VENTA.PASSAGEIROS.BTN.PERMITEDESABILITARBTNINFO'',''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,''2'',''VDA > VENDAS >> PERMITE DESABILITAR BOTAO PASSAGEIROS'',''COM.RJCONSULTORES.VENTABOLETOS.GUI.VENTA.PASSAGEIROS.BTN.PERMITEDESABILITARBTNPASSAGEIROS'',''1'',SYSDATE,''1'')'; + + exception + when dup_val_on_index then null; + when except_02291 then null; +end; + + diff --git a/src/db/migration/V20220818_1053__AL1229.sql b/src/db/migration/V20220818_1053__AL1229.sql new file mode 100644 index 000000000..7c2def376 --- /dev/null +++ b/src/db/migration/V20220818_1053__AL1229.sql @@ -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 ESTADO ADD (TIMEOUT_BPE NUMBER(6,0))'; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20220822_1120__mantis24815.sql b/src/db/migration/V20220822_1120__mantis24815.sql new file mode 100644 index 000000000..c0d67a78f --- /dev/null +++ b/src/db/migration/V20220822_1120__mantis24815.sql @@ -0,0 +1,15 @@ +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 > PUNTO VENTA > PERMITE APENAS BLOQUEIO DESBLOQUEIO AGENCIA'', + ''COM.RJCONSULTORES.ADMINISTRACION.PUNTOVENTA.PERMITEAPENASBLOQUEIODESBLOQUEIOAGENCIA'', 1, SYSDATE, 1)'; + exception + when dup_val_on_index then null; + when except_02291 then null; +end; diff --git a/src/db/migration/svn.ico b/src/db/migration/svn.ico new file mode 100644 index 000000000..ba63376b6 Binary files /dev/null and b/src/db/migration/svn.ico differ diff --git a/src/db/postgresql/migration/V20200811_1630__jiraAL1199.sql b/src/db/postgresql/migration/V20200811_1630__jiraAL1199.sql new file mode 100644 index 000000000..9832aded8 --- /dev/null +++ b/src/db/postgresql/migration/V20200811_1630__jiraAL1199.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE EVENTO_EXTRA ADD (PUNTOVENTASEGUNDAVIAID NUMBER(7,0)); + EXCEPTION WHEN unique_violation THEN NULL; +END +$$; diff --git a/src/db/postgresql/migration/V20211116_1019__mantis23634.sql b/src/db/postgresql/migration/V20211116_1019__mantis23634.sql new file mode 100644 index 000000000..974dfe9b0 --- /dev/null +++ b/src/db/postgresql/migration/V20211116_1019__mantis23634.sql @@ -0,0 +1,27 @@ +DO $$ +BEGIN + ALTER TABLE PTOVTA_COMISSAO ADD (RECARGACELULARALTA NUMBER(7,2), RECARGACELULARBAIXA NUMBER(7,2)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + ALTER TABLE COMISSAO ADD (RECEITA_RECARGACELULAR NUMBER(12,2)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + ALTER TABLE COMISSAO ADD (RECEITA_BRUTA_RECARGACELULAR NUMBER(12,2)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + INSERT INTO TIPO_OPERACION_CC (TIPOOPERACIONCC_ID, DESCTIPO, CVETIPO, INDCREDITO, ACTIVO, FECMODIF, USUARIO_ID) VALUES (7, ''COMISSAO RECARGA'', ''CR'', 1, 1, SYSDATE, 99); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; diff --git a/src/db/postgresql/migration/V20211207_1433__mantis23635.sql b/src/db/postgresql/migration/V20211207_1433__mantis23635.sql new file mode 100644 index 000000000..4ea502839 --- /dev/null +++ b/src/db/postgresql/migration/V20211207_1433__mantis23635.sql @@ -0,0 +1,21 @@ +DO $$ +BEGIN + ALTER TABLE BOLETO_CHECKIN ADD INDCHECKINBLOQUEADO NUMBER(1); + exception when duplicate_column then null; +END +$$; +/ +DO $$ +BEGIN + Insert into FUNCION_SISTEMA (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,FECMODIF,USUARIO_ID) + values (FUNCION_SISTEMA_SEQ.nextval,'1','PERMITE BLOQUEAR/LIBERAR CHECKIN','COM.RJCONSULTORES.VENTABOLETOS.GUI.VENTA.MENU.ITENS.ITEMMENUCHECKIN.CHECKINBLOQUEADO', '1',sysdate,'-1'); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + ALTER TABLE EMPRESA ADD INDCHECKINBLOQUEADOREMARCACAO NUMBER(1); + exception when duplicate_column then null; +END +$$; diff --git a/src/db/postgresql/migration/V20211214_1829__mantis23543.sql b/src/db/postgresql/migration/V20211214_1829__mantis23543.sql new file mode 100644 index 000000000..d6025fee1 --- /dev/null +++ b/src/db/postgresql/migration/V20211214_1829__mantis23543.sql @@ -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 FECHAMENTO_BOLETO ADD INDBOLETOQUITADO NUMBER(1,0) '; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20211217_1221__mantis23543.sql b/src/db/postgresql/migration/V20211217_1221__mantis23543.sql new file mode 100644 index 000000000..d2ae64b79 --- /dev/null +++ b/src/db/postgresql/migration/V20211217_1221__mantis23543.sql @@ -0,0 +1,15 @@ +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,''VDA > AUTORIZACAO > FECHAMENTO CONTA CORRENTE > QUITAR BOLETO'',''COM.RJCONSULTORES.VENTABOLETOS.FECHAMENTOCONTACORRENTE.QUITARBOLETO'', 1, sysdate, 1)'; + + exception + when dup_val_on_index then null; + when except_02291 then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220121_1053__mantis24036.sql b/src/db/postgresql/migration/V20220121_1053__mantis24036.sql new file mode 100644 index 000000000..2e23ccf27 --- /dev/null +++ b/src/db/postgresql/migration/V20220121_1053__mantis24036.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE PUNTO_VENTA ADD (INDBLOQCANCBILHETEIMPRESSO NUMBER(1,0)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220131_1201__mantis23939.sql b/src/db/postgresql/migration/V20220131_1201__mantis23939.sql new file mode 100644 index 000000000..b505f0843 --- /dev/null +++ b/src/db/postgresql/migration/V20220131_1201__mantis23939.sql @@ -0,0 +1,13 @@ +DO $$ +BEGIN + ALTER TABLE ocd ADD(NUMTARJETA_DEB VARCHAR2(48 BYTE), +NUMAUTORIZACION_DEB VARCHAR2(45 BYTE), +NSU_DEB VARCHAR2(18 BYTE), +VALOR_TARJETA_DEB NUMBER(7,2), +VALOR_DEVOLVIDO_EM_DINHEIRO NUMBER(7,2) ); + +BEGIN; +$$; + + + diff --git a/src/db/postgresql/migration/V20220201_1048__mantis24050.sql b/src/db/postgresql/migration/V20220201_1048__mantis24050.sql new file mode 100644 index 000000000..fec247015 --- /dev/null +++ b/src/db/postgresql/migration/V20220201_1048__mantis24050.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE ESQUEMA_CORRIDA ADD (HORASALIDA_EXTRA DATE); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220201_1756__mantis24059.sql b/src/db/postgresql/migration/V20220201_1756__mantis24059.sql new file mode 100644 index 000000000..7057afa27 --- /dev/null +++ b/src/db/postgresql/migration/V20220201_1756__mantis24059.sql @@ -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 > RELATORIOS > INTEGRACAO > RETORNO BANCARIO'', + ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIORETORNOBANCARIO'', 1, SYSDATE, 1)'; + + exception + when dup_val_on_index then null; + when except_02291 then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220202_1120__mantis24085.sql b/src/db/postgresql/migration/V20220202_1120__mantis24085.sql new file mode 100644 index 000000000..a7a0adf76 --- /dev/null +++ b/src/db/postgresql/migration/V20220202_1120__mantis24085.sql @@ -0,0 +1,15 @@ +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,''VDA > CAIXA > CONSULTA DE BILHETES > LANÇAR RECEITA/DESPESA'',''COM.RJCONSULTORES.VENTABOLETOS.GUI.CONSULTABOLETO.LANCARRECEITADESPESA'', 1, sysdate, 1)'; + + exception + when dup_val_on_index then null; + when except_02291 then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220208_1729__mantis24059.sql b/src/db/postgresql/migration/V20220208_1729__mantis24059.sql new file mode 100644 index 000000000..ae84cbdae --- /dev/null +++ b/src/db/postgresql/migration/V20220208_1729__mantis24059.sql @@ -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 FECHAMENTO_BOLETO ADD USUARIO_ID_QUITA NUMBER(7,0)'; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220211_1521__mantis24054.sql b/src/db/postgresql/migration/V20220211_1521__mantis24054.sql new file mode 100644 index 000000000..ab4fdc0d3 --- /dev/null +++ b/src/db/postgresql/migration/V20220211_1521__mantis24054.sql @@ -0,0 +1,7 @@ +DO $$ +BEGIN + INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, 'IMPRIMETARJETAINTERNACIONAL', 'DEFINE OS PAISES QUE UTILIZAM A IMPRESSAO DE TARJETA INTERNACIONAL, IDs SEPARADOS POR VIRGULA', null, '1', '1', '1', sysdate, '1') + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; diff --git a/src/db/postgresql/migration/V20220304_0909__mantis24126.sql b/src/db/postgresql/migration/V20220304_0909__mantis24126.sql new file mode 100644 index 000000000..b972ec025 --- /dev/null +++ b/src/db/postgresql/migration/V20220304_0909__mantis24126.sql @@ -0,0 +1,7 @@ +DO $$ +BEGIN + INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, 'AUTOCOMPLETECUPOMDESCONTO', 'DEFINE SE O SISTEMA REALIZA O AUTOCOMPLETE DOS CUPOMS DE DESCONTO', 'true', '1', '1', '1', sysdate, '1') + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; diff --git a/src/db/postgresql/migration/V20220309_1748__mantis24061.sql b/src/db/postgresql/migration/V20220309_1748__mantis24061.sql new file mode 100644 index 000000000..e8a32dfb6 --- /dev/null +++ b/src/db/postgresql/migration/V20220309_1748__mantis24061.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE EMPRESA ADD INDLIMITACATEGORIAPORCORRIDA NUMBER(1,0)'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220316_1600__mantis24139.sql b/src/db/postgresql/migration/V20220316_1600__mantis24139.sql new file mode 100644 index 000000000..a906ad251 --- /dev/null +++ b/src/db/postgresql/migration/V20220316_1600__mantis24139.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE PARADA ADD INDINTEGRACAOW2I NUMBER(1,0) + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; diff --git a/src/db/postgresql/migration/V20220321_1121__mantis24091.sql b/src/db/postgresql/migration/V20220321_1121__mantis24091.sql new file mode 100644 index 000000000..5250fbf9e --- /dev/null +++ b/src/db/postgresql/migration/V20220321_1121__mantis24091.sql @@ -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 > RELATORIOS > INTEGRACAO > CT-e OS'', + ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOCTEOS'', 1, SYSDATE, 1)'; + + exception + when dup_val_on_index then null; + when except_02291 then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220330_0813__mantis24313.sql b/src/db/postgresql/migration/V20220330_0813__mantis24313.sql new file mode 100644 index 000000000..039c5d1d7 --- /dev/null +++ b/src/db/postgresql/migration/V20220330_0813__mantis24313.sql @@ -0,0 +1,42 @@ +DO $$ +BEGIN + CREATE TABLE AJUSTE_CAJA_LOG ( + AJUSTECAJALOG_ID NUMBER(15) NOT NULL, + CAJA_ID NUMBER(15) NULL, + IND_CAJA NUMBER(1) NULL, + IND_CAJA_FP NUMBER(1) NULL, + USUARIO_ID NUMBER(7) NULL, + ACTIVO NUMBER(1) NULL, + FECMODIF DATE NULL, + PRIMARY KEY (AJUSTECAJALOG_ID)); + EXCEPTION WHEN duplicate_object THEN NULL; +END +$$; +/ + +DO $$ +BEGIN + CREATE SEQUENCE AJUSTE_CAJA_LOG_SEQ MINVALUE 1 MAXVALUE 999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE; + EXCEPTION WHEN duplicate_object THEN NULL; +END +$$; +/ + +DO $$ +BEGIN + CREATE INDEX IDX_CAJA_AJ_LOG ON AJUSTE_CAJA_LOG (CAJA_ID); + EXCEPTION WHEN duplicate_object THEN NULL; +END +$$; +/ + +DO $$ +BEGIN + INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, 'PERMITE_AJUSTE_CAIXA_ANTES_FECHAMENTO', 'PERMITE AJUSTE DO CAIXA ANTES DO FECHAMENTO', 'FALSE', '1', '1', '1', now(), '1'); + + EXCEPTION + WHEN OTHERS THEN NULL; + WHEN unique_violation THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220407_0921__mantis24128.sql b/src/db/postgresql/migration/V20220407_0921__mantis24128.sql new file mode 100644 index 000000000..b32af8f6e --- /dev/null +++ b/src/db/postgresql/migration/V20220407_0921__mantis24128.sql @@ -0,0 +1,26 @@ +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 > RELATORIOS > RELATORIOS > RELATORIOS BPe > Bpe Substituido'', + ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOBPESUBSTITUIDO'', 1, SYSDATE, 1)'; + + exception + when dup_val_on_index then null; + when except_02291 then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'update FUNCION_SISTEMA set NOMBFUNCION = ''ADM > RELATORIOS > RELATORIOS > RELATORIOS BPe > BPe'' + WHERE DESCRUTA = ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.RELATORIO.BPE'''; +end; +/ \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220425_1058__mantis24117.sql b/src/db/postgresql/migration/V20220425_1058__mantis24117.sql new file mode 100644 index 000000000..633a662f2 --- /dev/null +++ b/src/db/postgresql/migration/V20220425_1058__mantis24117.sql @@ -0,0 +1,47 @@ +DO $$ +BEGIN + INSERT INTO CONSTANTE (CONSTANTE_ID,NOMBCONSTANTE,DESCCONSTANTE,INDTIPOCONSTANTE,VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID) VALUES + (CONSTANTE_seq.nextval,'MP00_URL_API_MOBIPIX','MobiPix. URL base da API.',1, 'https://qa.api.mobipix.com.br/api/rodosoft',1,1,null,1) + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + INSERT INTO CONSTANTE (CONSTANTE_ID,NOMBCONSTANTE,DESCCONSTANTE,INDTIPOCONSTANTE,VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID) VALUES + (CONSTANTE_seq.nextval,'MP01_MOBIPIX_API_ID','MOBIPIX. api ID',1, '762c3f9d-ecd4-4dfe-9c2d-09d9564caa0a',1,1,null,1) + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + INSERT INTO CONSTANTE (CONSTANTE_ID,NOMBCONSTANTE,DESCCONSTANTE,INDTIPOCONSTANTE,VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID) VALUES + (CONSTANTE_seq.nextval,'MP02_MOBIPIX_API_KEY','MOBIPIX. API KEY',1, '762c3f9d-ecd4-4dfe-9c2d-09d9564caa0a',1,1,null,1) + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + INSERT INTO CONSTANTE (CONSTANTE_ID,NOMBCONSTANTE,DESCCONSTANTE,INDTIPOCONSTANTE,VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID) VALUES + (CONSTANTE_seq.nextval,'MP03_PATH_AUTENTICACAO_MOBIPIX','MOBIPIX. url de autenticacao.',1, '/auth/pos',1,1,null,1) + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + INSERT INTO CONSTANTE (CONSTANTE_ID,NOMBCONSTANTE,DESCCONSTANTE,INDTIPOCONSTANTE,VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID) VALUES + (CONSTANTE_seq.nextval,'MP04_PATH_PAGAMENTO_MOBIPIX','MOBIPIX. url de pagamento.',1, '/transactions',1,1,null,1) + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + INSERT INTO CONSTANTE (CONSTANTE_ID,NOMBCONSTANTE,DESCCONSTANTE,INDTIPOCONSTANTE,VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID) VALUES + (CONSTANTE_seq.nextval,'MP05_PATH_ESTORNO_MOBIPIX','MOBIPIX. url de estorno.',1, '/transactions',1,1,null,1) + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220504_1508__mantis24368.sql b/src/db/postgresql/migration/V20220504_1508__mantis24368.sql new file mode 100644 index 000000000..4e11c22cf --- /dev/null +++ b/src/db/postgresql/migration/V20220504_1508__mantis24368.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE ESQUEMA_CORRIDA ADD (INDBLOQUEIAWEBAPOSSAIDA NUMBER(1,0)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; diff --git a/src/db/postgresql/migration/V20220608_1022__mantis24539.sql b/src/db/postgresql/migration/V20220608_1022__mantis24539.sql new file mode 100644 index 000000000..4eeba5341 --- /dev/null +++ b/src/db/postgresql/migration/V20220608_1022__mantis24539.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE CATEGORIA_DESCUENTO ADD (INDEXIGENUMFIDELIDADE NUMBER(1,0) ); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220614_1101__mantis24629.sql b/src/db/postgresql/migration/V20220614_1101__mantis24629.sql new file mode 100644 index 000000000..983a8b62a --- /dev/null +++ b/src/db/postgresql/migration/V20220614_1101__mantis24629.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE CATEGORIA_DESCUENTO ADD TIPOOCUPACION_ID NUMBER(7,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220614_1509__mantis24629.sql b/src/db/postgresql/migration/V20220614_1509__mantis24629.sql new file mode 100644 index 000000000..c2a1d22f6 --- /dev/null +++ b/src/db/postgresql/migration/V20220614_1509__mantis24629.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + Insert into TIPO_OCUPACION (TIPOOCUPACION_ID,CVETIPOOCUPACION,DESCTIPO,EQUIVALENCIA_ID,ACTIVO,FECMODIF,USUARIO_ID) values (TIPO_OCUPACION_SEQ.nextval, null,''POLICIAL MILITAR'',null,1,sysdate,1) + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220624_1043__mantis24642.sql b/src/db/postgresql/migration/V20220624_1043__mantis24642.sql new file mode 100644 index 000000000..b16399b07 --- /dev/null +++ b/src/db/postgresql/migration/V20220624_1043__mantis24642.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE EVENTO_EXTRA ADD (INDSEGUNDAVIAIMPRESSA NUMBER(1,0), FECSEGUNDAVIA DATE); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220624_1101__mantis24590.sql b/src/db/postgresql/migration/V20220624_1101__mantis24590.sql new file mode 100644 index 000000000..6ae79c645 --- /dev/null +++ b/src/db/postgresql/migration/V20220624_1101__mantis24590.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE ORGAO_CANCELACION ADD INDIMPRIMECOMPROVANTETRANSFERENCIA NUMBER(1); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220630_0923__mantis24642.sql b/src/db/postgresql/migration/V20220630_0923__mantis24642.sql new file mode 100644 index 000000000..564bdbf0d --- /dev/null +++ b/src/db/postgresql/migration/V20220630_0923__mantis24642.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE EMPRESA ADD INDSEGUNDAVIASEGOPCIONAL NUMBER(1,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220714_1101__mantis24787.sql b/src/db/postgresql/migration/V20220714_1101__mantis24787.sql new file mode 100644 index 000000000..96e61ce6d --- /dev/null +++ b/src/db/postgresql/migration/V20220714_1101__mantis24787.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE ORGAO_CANCELACION ADD INDIMPRIMECOMPROVANTETRANS NUMBER(1); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220715_0921__mantis24733.sql b/src/db/postgresql/migration/V20220715_0921__mantis24733.sql new file mode 100644 index 000000000..b2be7707f --- /dev/null +++ b/src/db/postgresql/migration/V20220715_0921__mantis24733.sql @@ -0,0 +1,27 @@ +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 > RELATORIOS > RELATORIOS > RELATORIOS FINANCEIRO > FECHAMENTO CNT > BOLETOS'', + ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.CONTACORRENTE.RELATORIOBOLETOS'', 1, SYSDATE, 1)'; + + exception + when dup_val_on_index then null; + when except_02291 then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'update FUNCION_SISTEMA set NOMBFUNCION = ''ADM > RELATORIOS > RELATORIOS > RELATORIOS FINANCEIRO > FECHAMENTO CNT > DEPÓSITOS'' + ,DESCRUTA = ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.CONTACORRENTE.RELATORIODEPOSITOS'' + WHERE DESCRUTA = ''COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIODEPOSITOS'''; +end; +/ \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220715_1529__mantis24659.sql b/src/db/postgresql/migration/V20220715_1529__mantis24659.sql new file mode 100644 index 000000000..493a323d7 --- /dev/null +++ b/src/db/postgresql/migration/V20220715_1529__mantis24659.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE ORGAO_CONCEDENTE ADD (INDPERMPAGMULTAPREESTORNO NUMBER(1,0) ); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220719_1115__mantis24711.sql b/src/db/postgresql/migration/V20220719_1115__mantis24711.sql new file mode 100644 index 000000000..a77b3a458 --- /dev/null +++ b/src/db/postgresql/migration/V20220719_1115__mantis24711.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN +ALTER TABLE PUNTO_VENTA MODIFY TIEMPOCANCELACION NUMBER(5,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220722_0820__mantis24678.sql b/src/db/postgresql/migration/V20220722_0820__mantis24678.sql new file mode 100644 index 000000000..5a568bd2d --- /dev/null +++ b/src/db/postgresql/migration/V20220722_0820__mantis24678.sql @@ -0,0 +1,25 @@ +DO $$ +BEGIN + CREATE TABLE PTOVTA_EXCECAO_MULTA_CANC ( + PTOVTAEXCECAOMULTACANC_ID NUMBER(7) NOT NULL, + PUNTOVENTA_ID NUMBER(7) NOT NULL, + EMPRESA_ID NUMBER(7) NOT NULL, + ORGAOCONCEDENTE_ID NUMBER(7) NOT NULL, + FECMODIF DATE NULL, + ACTIVO NUMBER(1) NULL, + USUARIO_ID NUMBER(7) NULL, + PRIMARY KEY (PTOVTAEXCECAOMULTACANC_ID), + FOREIGN KEY (EMPRESA_ID) REFERENCES EMPRESA, + FOREIGN KEY (PUNTOVENTA_ID) REFERENCES PUNTO_VENTA, + FOREIGN KEY (ORGAOCONCEDENTE_ID) REFERENCES ORGAO_CONCEDENTE + ); + exception when object_exists then null; +END +$$; +/ +DO $$ +BEGIN + CREATE SEQUENCE PTOVTA_EXCECAO_MULTA_CANC_SEQ INCREMENT BY 1 START WITH 1 MAXVALUE 9999999 MINVALUE 1 NOCYCLE CACHE 20 NOORDER; + exception when object_exists then null; +END +$$; diff --git a/src/db/postgresql/migration/V20220725_1721__mantis24734.sql b/src/db/postgresql/migration/V20220725_1721__mantis24734.sql new file mode 100644 index 000000000..2c5c04fee --- /dev/null +++ b/src/db/postgresql/migration/V20220725_1721__mantis24734.sql @@ -0,0 +1,8 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE FECHAMENTO_BOLETO ADD (VALOR_JUROS NUMBER(7,2) , FECBAIXA DATE )'; + exception when column_exists then null; +end; +/ \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220805_1028__mantis24770.sql b/src/db/postgresql/migration/V20220805_1028__mantis24770.sql new file mode 100644 index 000000000..599aef629 --- /dev/null +++ b/src/db/postgresql/migration/V20220805_1028__mantis24770.sql @@ -0,0 +1,10 @@ +DO $$ +BEGIN + INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (CONSTANTE_SEQ.nextval, 'PERMITE_CONVENIO_DESCONTO_CONFIRMACAO', 'PERMITE CALCULAR O CONVENIO DESCONTO NA CONFIRMAÇÃO VIA API', 'FALSE', '1', '1', '1', now(), '1'); + + EXCEPTION + WHEN OTHERS THEN NULL; + WHEN unique_violation THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220822_1120__mantis24815.sql b/src/db/postgresql/migration/V20220822_1120__mantis24815.sql new file mode 100644 index 000000000..73a20f652 --- /dev/null +++ b/src/db/postgresql/migration/V20220822_1120__mantis24815.sql @@ -0,0 +1,7 @@ +DO $$ +BEGIN + INSERT INTO FUNCION_SISTEMA (FUNCIONSISTEMA_ID, SISTEMA_ID, NOMBFUNCION, DESCRUTA, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (FUNCION_SISTEMA_SEQ.nextVal, 1, 'ADM > CATALOGO > PUNTO VENTA > PERMITE APENAS BLOQUEIO DESBLOQUEIO AGENCIA', + 'COM.RJCONSULTORES.ADMINISTRACION.PUNTOVENTA.PERMITEAPENASBLOQUEIODESBLOQUEIOAGENCIA', 1, SYSDATE, 1); +END +$$;