From 50c622614b38a623f15730ec62832832425b25c7 Mon Sep 17 00:00:00 2001 From: valdir Date: Fri, 9 Nov 2018 18:15:02 +0000 Subject: [PATCH] 0012283: Konduto: integracao com anti fraude bug#12283 dev:valdevir qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@86916 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../migration/V20181029_1020__mantis12283.sql | 28 ---------------- .../migration/V20181109_1606__mantis12283.sql | 7 ++++ .../migration/V20181025_1020__mantis12283.sql | 32 +++++++++++++++++++ .../migration/V20181109_1606__mantis12283.sql | 7 ++++ 4 files changed, 46 insertions(+), 28 deletions(-) delete mode 100644 src/db/migration/V20181029_1020__mantis12283.sql create mode 100644 src/db/migration/V20181109_1606__mantis12283.sql create mode 100644 src/db/postgresql/migration/V20181025_1020__mantis12283.sql create mode 100644 src/db/postgresql/migration/V20181109_1606__mantis12283.sql diff --git a/src/db/migration/V20181029_1020__mantis12283.sql b/src/db/migration/V20181029_1020__mantis12283.sql deleted file mode 100644 index fa5b885e8..000000000 --- a/src/db/migration/V20181029_1020__mantis12283.sql +++ /dev/null @@ -1,28 +0,0 @@ -declare - object_exists exception; - pragma exception_init (object_exists , -00955); -begin - execute immediate - 'CREATE SEQUENCE KONDUTOKEY_EMPRESA_PK 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 KONDUTOKEY_EMPRESA - ( - KONDUTOKEYEMPRESA_ID NUMBER(3,0) NOT NULL ENABLE, - EMPRESA_ID NUMBER(7,0), - KONDUTO_KEY VARCHAR2(50), - ACTIVO NUMBER(1,0), - FECMODIF DATE, - USUARIO_ID NUMBER(7,0), - CONSTRAINT KONDUTOKEY_EMPRESA_PK PRIMARY KEY (KONDUTOKEYEMPRESA_ID) ENABLE, - FOREIGN KEY (EMPRESA_ID) REFERENCES EMPRESA (EMPRESA_ID) ENABLE - )'; - exception when object_exists then null; -end; - diff --git a/src/db/migration/V20181109_1606__mantis12283.sql b/src/db/migration/V20181109_1606__mantis12283.sql new file mode 100644 index 000000000..f91a0a516 --- /dev/null +++ b/src/db/migration/V20181109_1606__mantis12283.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE EMPRESA ADD ( ANTIFRAUDEKEY VARCHAR2(50) )'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20181025_1020__mantis12283.sql b/src/db/postgresql/migration/V20181025_1020__mantis12283.sql new file mode 100644 index 000000000..13866fe7e --- /dev/null +++ b/src/db/postgresql/migration/V20181025_1020__mantis12283.sql @@ -0,0 +1,32 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE SEQUENCE TRANSACAOKONDUTO_PK 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 TRANSACAO_KONDUTO + (TRANSACAOKONDUTO_ID NUMBER(7,0) NOT NULL ENABLE, + BOLETO_ID NUMBER(15,0), + EMPRESA_ID NUMBER(7,0), + KONDUTO_ID VARCHAR2(50), + STATUSTRANSACAO VARCHAR2(2), + STATUSTRANSACAOKONDUTO VARCHAR2(20), + TENTATIVAENVIO NUMBER(3,0), + ACTIVO NUMBER(1,0), + FECMODIF DATE, + USUARIO_ID NUMBER(7,0), + CONSTRAINT TRANSACAOKONDUTO_PK PRIMARY KEY (TRANSACAOKONDUTO_ID) ENABLE, + FOREIGN KEY (EMPRESA_ID) + REFERENCES EMPRESA (EMPRESA_ID) ENABLE + )'; + exception when object_exists then null; +end; + diff --git a/src/db/postgresql/migration/V20181109_1606__mantis12283.sql b/src/db/postgresql/migration/V20181109_1606__mantis12283.sql new file mode 100644 index 000000000..f91a0a516 --- /dev/null +++ b/src/db/postgresql/migration/V20181109_1606__mantis12283.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE EMPRESA ADD ( ANTIFRAUDEKEY VARCHAR2(50) )'; + exception when column_exists then null; +end; \ No newline at end of file