diff --git a/src/db/migration/V20190411_1627__mantis13774.sql b/src/db/migration/V20190411_1627__mantis13774.sql new file mode 100644 index 000000000..b5aa03773 --- /dev/null +++ b/src/db/migration/V20190411_1627__mantis13774.sql @@ -0,0 +1,16 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE TABLE INTEGRACAO_TOTVS_CAJA ( + INTEGRACAOCAJA_ID NUMBER(15) NOT NULL + , CAJA_ID NUMBER(15) NOT NULL + , INTEGRADOTOTVS NUMBER(5) + , FECHOREFETIVA TIMESTAMP + , MSG_RETORNO CLOB + , CONSTRAINT INTEGRACAO_TOTVS_CAJA_PK PRIMARY KEY ( INTEGRACAOCAJA_ID ) + )'; + + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20190418_1900__mantis13776.sql b/src/db/migration/V20190418_1900__mantis13776.sql new file mode 100644 index 000000000..68b948a33 --- /dev/null +++ b/src/db/migration/V20190418_1900__mantis13776.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'CREATE SEQUENCE INTEGRACAO_TOTVS_CAJA_SEQ INCREMENT BY 1 START WITH 1'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20190418_1901__mantis13776.sql b/src/db/migration/V20190418_1901__mantis13776.sql new file mode 100644 index 000000000..4c6eddf82 --- /dev/null +++ b/src/db/migration/V20190418_1901__mantis13776.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'ALTER TABLE INTEGRACAO_TOTVS_CAJA ADD CONSTRAINT INTEGRACAO_TOTVS_CAJA_FK1 FOREIGN KEY(CAJA_ID )REFERENCES CAJA(CAJA_ID )'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20190418_1902__mantis13775.sql b/src/db/migration/V20190418_1902__mantis13775.sql new file mode 100644 index 000000000..903593fe4 --- /dev/null +++ b/src/db/migration/V20190418_1902__mantis13775.sql @@ -0,0 +1,10 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'Insert into CONSTANTE (CONSTANTE_ID,NOMBCONSTANTE,DESCCONSTANTE,INDTIPOCONSTANTE, + VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID) + values (CONSTANTE_SEQ.NEXTVAL,''CRON_ROTINA_REINTEGRACAO_BILHETE_TOTVS'',''CRON_ROTINA_REINTEGRACAO_BILHETE_TOTVS'', + 1,''DEBUG'',null,''1'',sysdate,''1'')'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20190418_1903__mantis13776.sql b/src/db/migration/V20190418_1903__mantis13776.sql new file mode 100644 index 000000000..25dd5a478 --- /dev/null +++ b/src/db/migration/V20190418_1903__mantis13776.sql @@ -0,0 +1,10 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'Insert into CONSTANTE (CONSTANTE_ID,NOMBCONSTANTE,DESCCONSTANTE,INDTIPOCONSTANTE, + VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID) + values (CONSTANTE_SEQ.NEXTVAL,''PATH_LOG_REINTEGRACAO_TOTVS'',''PATH_LOG_REINTEGRACAO_TOTVS'', + 1,''/dados/jboss/log/reintegracao/'',null,''1'',sysdate,''1'')'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20190411_1627__mantis13774.sql b/src/db/postgresql/migration/V20190411_1627__mantis13774.sql new file mode 100644 index 000000000..b5aa03773 --- /dev/null +++ b/src/db/postgresql/migration/V20190411_1627__mantis13774.sql @@ -0,0 +1,16 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE TABLE INTEGRACAO_TOTVS_CAJA ( + INTEGRACAOCAJA_ID NUMBER(15) NOT NULL + , CAJA_ID NUMBER(15) NOT NULL + , INTEGRADOTOTVS NUMBER(5) + , FECHOREFETIVA TIMESTAMP + , MSG_RETORNO CLOB + , CONSTRAINT INTEGRACAO_TOTVS_CAJA_PK PRIMARY KEY ( INTEGRACAOCAJA_ID ) + )'; + + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20190418_1900__mantis13776.sql b/src/db/postgresql/migration/V20190418_1900__mantis13776.sql new file mode 100644 index 000000000..68b948a33 --- /dev/null +++ b/src/db/postgresql/migration/V20190418_1900__mantis13776.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'CREATE SEQUENCE INTEGRACAO_TOTVS_CAJA_SEQ INCREMENT BY 1 START WITH 1'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20190418_1901__mantis13776.sql b/src/db/postgresql/migration/V20190418_1901__mantis13776.sql new file mode 100644 index 000000000..4c6eddf82 --- /dev/null +++ b/src/db/postgresql/migration/V20190418_1901__mantis13776.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'ALTER TABLE INTEGRACAO_TOTVS_CAJA ADD CONSTRAINT INTEGRACAO_TOTVS_CAJA_FK1 FOREIGN KEY(CAJA_ID )REFERENCES CAJA(CAJA_ID )'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20190418_1902__mantis13775.sql b/src/db/postgresql/migration/V20190418_1902__mantis13775.sql new file mode 100644 index 000000000..903593fe4 --- /dev/null +++ b/src/db/postgresql/migration/V20190418_1902__mantis13775.sql @@ -0,0 +1,10 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'Insert into CONSTANTE (CONSTANTE_ID,NOMBCONSTANTE,DESCCONSTANTE,INDTIPOCONSTANTE, + VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID) + values (CONSTANTE_SEQ.NEXTVAL,''CRON_ROTINA_REINTEGRACAO_BILHETE_TOTVS'',''CRON_ROTINA_REINTEGRACAO_BILHETE_TOTVS'', + 1,''DEBUG'',null,''1'',sysdate,''1'')'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20190418_1903__mantis13776.sql b/src/db/postgresql/migration/V20190418_1903__mantis13776.sql new file mode 100644 index 000000000..25dd5a478 --- /dev/null +++ b/src/db/postgresql/migration/V20190418_1903__mantis13776.sql @@ -0,0 +1,10 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'Insert into CONSTANTE (CONSTANTE_ID,NOMBCONSTANTE,DESCCONSTANTE,INDTIPOCONSTANTE, + VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID) + values (CONSTANTE_SEQ.NEXTVAL,''PATH_LOG_REINTEGRACAO_TOTVS'',''PATH_LOG_REINTEGRACAO_TOTVS'', + 1,''/dados/jboss/log/reintegracao/'',null,''1'',sysdate,''1'')'; + exception when object_exists then null; +end; \ No newline at end of file