From 79a88802d677835b8c1d86f3f16e2ed8754fa101 Mon Sep 17 00:00:00 2001 From: "lucas.taia" Date: Tue, 21 Jun 2022 22:22:07 +0000 Subject: [PATCH] fixes bug#24573 dev:lucas qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@112846 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20220610_1511__jira23.sql | 11 ++++ .../migration/V20220621_1520__mantis24573.sql | 58 +++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 src/db/migration/V20220610_1511__jira23.sql create mode 100644 src/db/migration/V20220621_1520__mantis24573.sql diff --git a/src/db/migration/V20220610_1511__jira23.sql b/src/db/migration/V20220610_1511__jira23.sql new file mode 100644 index 000000000..fe0d91504 --- /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/V20220621_1520__mantis24573.sql b/src/db/migration/V20220621_1520__mantis24573.sql new file mode 100644 index 000000000..f83d0ba41 --- /dev/null +++ b/src/db/migration/V20220621_1520__mantis24573.sql @@ -0,0 +1,58 @@ +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; +/ \ No newline at end of file