From 762fac488ab745599e6eefc03aae8fb7a505e82d Mon Sep 17 00:00:00 2001 From: fabio Date: Fri, 26 Jul 2019 20:26:19 +0000 Subject: [PATCH] =?UTF-8?q?fixes=20bug#15084=20dev:=20Lucas=20Silv=C3=A9ri?= =?UTF-8?q?o=20qua:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@96153 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20190723_1135__mantis15084.sql | 16 ++++++++++++++++ src/db/migration/V20190723_1136__mantis15084.sql | 7 +++++++ src/db/migration/V20190723_1137__mantis15084.sql | 7 +++++++ src/db/migration/V20190723_1138__mantis15084.sql | 10 ++++++++++ src/db/migration/V20190723_1646__mantis15084.sql | 7 +++++++ src/db/migration/V20190726_1621__mantis15085.sql | 10 ++++++++++ .../migration/V20190723_1135__mantis15084.sql | 16 ++++++++++++++++ .../migration/V20190723_1136__mantis15084.sql | 7 +++++++ .../migration/V20190723_1137__mantis15084.sql | 7 +++++++ .../migration/V20190723_1138__mantis15084.sql | 10 ++++++++++ .../migration/V20190723_1646__mantis15084.sql | 7 +++++++ .../migration/V20190726_1621__mantis15085.sql | 10 ++++++++++ 12 files changed, 114 insertions(+) create mode 100644 src/db/migration/V20190723_1135__mantis15084.sql create mode 100644 src/db/migration/V20190723_1136__mantis15084.sql create mode 100644 src/db/migration/V20190723_1137__mantis15084.sql create mode 100644 src/db/migration/V20190723_1138__mantis15084.sql create mode 100644 src/db/migration/V20190723_1646__mantis15084.sql create mode 100644 src/db/migration/V20190726_1621__mantis15085.sql create mode 100644 src/db/postgresql/migration/V20190723_1135__mantis15084.sql create mode 100644 src/db/postgresql/migration/V20190723_1136__mantis15084.sql create mode 100644 src/db/postgresql/migration/V20190723_1137__mantis15084.sql create mode 100644 src/db/postgresql/migration/V20190723_1138__mantis15084.sql create mode 100644 src/db/postgresql/migration/V20190723_1646__mantis15084.sql create mode 100644 src/db/postgresql/migration/V20190726_1621__mantis15085.sql diff --git a/src/db/migration/V20190723_1135__mantis15084.sql b/src/db/migration/V20190723_1135__mantis15084.sql new file mode 100644 index 000000000..7176b2e41 --- /dev/null +++ b/src/db/migration/V20190723_1135__mantis15084.sql @@ -0,0 +1,16 @@ +declare + table_exists exception; + pragma exception_init (table_exists , -00955); +begin + execute immediate + 'CREATE TABLE INTEGRACAO_TOTVS_SERVICO ( + INTEGRACAOSERVICO_ID NUMBER(15) NOT NULL + , ESQUEMACORRIDA_ID NUMBER(7) NOT NULL + , INTEGRADOTOTVS NUMBER(5) + , FECHOREFETIVA TIMESTAMP + , MSG_RETORNO CLOB + , CONSTRAINT INTEGRACAO_TOTVS_SERVICO_PK PRIMARY KEY ( INTEGRACAOSERVICO_ID ) + )'; + + exception when table_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20190723_1136__mantis15084.sql b/src/db/migration/V20190723_1136__mantis15084.sql new file mode 100644 index 000000000..5373921a1 --- /dev/null +++ b/src/db/migration/V20190723_1136__mantis15084.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'CREATE SEQUENCE INTEGRACAO_TOTVS_SERVICO_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/V20190723_1137__mantis15084.sql b/src/db/migration/V20190723_1137__mantis15084.sql new file mode 100644 index 000000000..dbe44e088 --- /dev/null +++ b/src/db/migration/V20190723_1137__mantis15084.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'ALTER TABLE INTEGRACAO_TOTVS_SERVICO ADD CONSTRAINT INTEGRACAO_TOTVS_SERVICO_FK1 FOREIGN KEY(ESQUEMACORRIDA_ID )REFERENCES ESQUEMA_CORRIDA(ESQUEMACORRIDA_ID )'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20190723_1138__mantis15084.sql b/src/db/migration/V20190723_1138__mantis15084.sql new file mode 100644 index 000000000..283ed8571 --- /dev/null +++ b/src/db/migration/V20190723_1138__mantis15084.sql @@ -0,0 +1,10 @@ +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,''CRON_ROTINA_REINTEGRACAO_SERVICO_TOTVS'',''CRON_ROTINA_REINTEGRACAO_SERVICO_TOTVS'', + 1,null,null,''1'',sysdate,''1'')'; + exception when dup_val_on_index then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20190723_1646__mantis15084.sql b/src/db/migration/V20190723_1646__mantis15084.sql new file mode 100644 index 000000000..983ed45ae --- /dev/null +++ b/src/db/migration/V20190723_1646__mantis15084.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE ESQUEMA_CORRIDA ADD (FECHORINTEGRADOTOTVS DATE, CONTADORINTEGRADOTOTVS NUMBER(7,0) )'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20190726_1621__mantis15085.sql b/src/db/migration/V20190726_1621__mantis15085.sql new file mode 100644 index 000000000..7b49b0398 --- /dev/null +++ b/src/db/migration/V20190726_1621__mantis15085.sql @@ -0,0 +1,10 @@ +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,''CRON_ROTINA_INTEGRACAO_SERVICO_TOTVS'',''CRON_ROTINA_INTEGRACAO_SERVICO_TOTVS'', + 1,null,null,''1'',sysdate,''1'')'; + exception when dup_val_on_index then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20190723_1135__mantis15084.sql b/src/db/postgresql/migration/V20190723_1135__mantis15084.sql new file mode 100644 index 000000000..7176b2e41 --- /dev/null +++ b/src/db/postgresql/migration/V20190723_1135__mantis15084.sql @@ -0,0 +1,16 @@ +declare + table_exists exception; + pragma exception_init (table_exists , -00955); +begin + execute immediate + 'CREATE TABLE INTEGRACAO_TOTVS_SERVICO ( + INTEGRACAOSERVICO_ID NUMBER(15) NOT NULL + , ESQUEMACORRIDA_ID NUMBER(7) NOT NULL + , INTEGRADOTOTVS NUMBER(5) + , FECHOREFETIVA TIMESTAMP + , MSG_RETORNO CLOB + , CONSTRAINT INTEGRACAO_TOTVS_SERVICO_PK PRIMARY KEY ( INTEGRACAOSERVICO_ID ) + )'; + + exception when table_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20190723_1136__mantis15084.sql b/src/db/postgresql/migration/V20190723_1136__mantis15084.sql new file mode 100644 index 000000000..5373921a1 --- /dev/null +++ b/src/db/postgresql/migration/V20190723_1136__mantis15084.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'CREATE SEQUENCE INTEGRACAO_TOTVS_SERVICO_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/V20190723_1137__mantis15084.sql b/src/db/postgresql/migration/V20190723_1137__mantis15084.sql new file mode 100644 index 000000000..dbe44e088 --- /dev/null +++ b/src/db/postgresql/migration/V20190723_1137__mantis15084.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'ALTER TABLE INTEGRACAO_TOTVS_SERVICO ADD CONSTRAINT INTEGRACAO_TOTVS_SERVICO_FK1 FOREIGN KEY(ESQUEMACORRIDA_ID )REFERENCES ESQUEMA_CORRIDA(ESQUEMACORRIDA_ID )'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20190723_1138__mantis15084.sql b/src/db/postgresql/migration/V20190723_1138__mantis15084.sql new file mode 100644 index 000000000..9aac8fa8d --- /dev/null +++ b/src/db/postgresql/migration/V20190723_1138__mantis15084.sql @@ -0,0 +1,10 @@ +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,''CRON_ROTINA_REINTEGRACAO_SERVICO_TOTVS'',''CRON_ROTINA_REINTEGRACAO_SERVICO_TOTVS'', + 1,null,null,''0'',sysdate,''1'')'; + exception when dup_val_on_index then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20190723_1646__mantis15084.sql b/src/db/postgresql/migration/V20190723_1646__mantis15084.sql new file mode 100644 index 000000000..983ed45ae --- /dev/null +++ b/src/db/postgresql/migration/V20190723_1646__mantis15084.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE ESQUEMA_CORRIDA ADD (FECHORINTEGRADOTOTVS DATE, CONTADORINTEGRADOTOTVS NUMBER(7,0) )'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20190726_1621__mantis15085.sql b/src/db/postgresql/migration/V20190726_1621__mantis15085.sql new file mode 100644 index 000000000..7b49b0398 --- /dev/null +++ b/src/db/postgresql/migration/V20190726_1621__mantis15085.sql @@ -0,0 +1,10 @@ +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,''CRON_ROTINA_INTEGRACAO_SERVICO_TOTVS'',''CRON_ROTINA_INTEGRACAO_SERVICO_TOTVS'', + 1,null,null,''1'',sysdate,''1'')'; + exception when dup_val_on_index then null; +end; \ No newline at end of file