From 42834669d5e575c9299981c74fc142eb7a3ca649 Mon Sep 17 00:00:00 2001 From: julio Date: Tue, 9 Jul 2019 17:55:40 +0000 Subject: [PATCH] fixes bug#14453 bug#14829 dev: julio qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@95584 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../migration/V20190625_1559__mantis14533.sql | 210 +----------------- .../migration/V20190709_1445__mantis14533.sql | 31 +++ .../migration/V20190709_1446__mantis14533.sql | 30 +++ .../migration/V20190709_1447__mantis14533.sql | 30 +++ .../migration/V20190709_1448__mantis14533.sql | 30 +++ .../migration/V20190709_1449__mantis14533.sql | 30 +++ .../migration/V20190709_1450__mantis14533.sql | 30 +++ .../migration/V20190709_1451__mantis14533.sql | 18 ++ 8 files changed, 206 insertions(+), 203 deletions(-) create mode 100644 src/db/migration/V20190709_1445__mantis14533.sql create mode 100644 src/db/migration/V20190709_1446__mantis14533.sql create mode 100644 src/db/migration/V20190709_1447__mantis14533.sql create mode 100644 src/db/migration/V20190709_1448__mantis14533.sql create mode 100644 src/db/migration/V20190709_1449__mantis14533.sql create mode 100644 src/db/migration/V20190709_1450__mantis14533.sql create mode 100644 src/db/migration/V20190709_1451__mantis14533.sql diff --git a/src/db/migration/V20190625_1559__mantis14533.sql b/src/db/migration/V20190625_1559__mantis14533.sql index 3f6b5377c..0588adef5 100644 --- a/src/db/migration/V20190625_1559__mantis14533.sql +++ b/src/db/migration/V20190625_1559__mantis14533.sql @@ -1,226 +1,30 @@ -declare column_exists exception; pragma exception_init (column_exists , -01430); +declare column_exists exception; + pragma exception_init (column_exists , -01430); begin execute immediate 'ALTER TABLE BPE ADD (cMunIni VARCHAR2(7))'; exception when column_exists then null; end; - / +/ declare column_exists exception; pragma exception_init (column_exists , -01430); begin execute immediate 'ALTER TABLE BPE ADD (cMunFim VARCHAR2(7))'; exception when column_exists then null; end; - / +/ declare column_exists exception; pragma exception_init (column_exists , -01430); begin execute immediate 'ALTER TABLE BPE ADD (UFIni VARCHAR2(2))'; exception when column_exists then null; end; - / +/ declare column_exists exception; pragma exception_init (column_exists , -01430); begin execute immediate 'ALTER TABLE BPE ADD (UFFim VARCHAR2(2))'; exception when column_exists then null; end; - / +/ declare column_exists exception; pragma exception_init (column_exists , -01430); begin execute immediate 'ALTER TABLE BPE ADD (nBP VARCHAR2(9))'; exception when column_exists then null; end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (dhEmb VARCHAR2(25))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (CST00 VARCHAR2(2))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (CST20 VARCHAR2(2))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (CST45 VARCHAR2(2))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (CST90 VARCHAR2(2))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (CSTOutraUF VARCHAR2(2))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (CSTSN VARCHAR2(2))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (vBC00 VARCHAR2(15))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (pICMS00 VARCHAR2(5))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (vICMS00 VARCHAR2(15))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (vBC20 VARCHAR2(15))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (pICMS20 VARCHAR2(5))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (vICMS20 VARCHAR2(15))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (vBP VARCHAR2(15))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (vDesconto VARCHAR2(15))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (vPgto VARCHAR2(15))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (tpComp01 VARCHAR2(2))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (tpComp02 VARCHAR2(2))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (tpComp03 VARCHAR2(2))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (tpComp04 VARCHAR2(2))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (tpComp05 VARCHAR2(2))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (tpComp06 VARCHAR2(2))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (tpComp99 VARCHAR2(2))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (vComp01 VARCHAR2(15))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (vComp02 VARCHAR2(15))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (vComp03 VARCHAR2(15))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (vComp04 VARCHAR2(15))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (vComp05 VARCHAR2(15))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (vComp06 VARCHAR2(15))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (vComp99 VARCHAR2(15))'; -exception when column_exists then null; - end; - / - declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (PREDBC VARCHAR2(5))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (CSTOUTRAUF VARCHAR2(2))'; -exception when column_exists then null; - end; - / -declare column_exists exception; - pragma exception_init (column_exists , -01430); - begin execute immediate 'ALTER TABLE BPE ADD (CSTSN VARCHAR2(2))'; -exception when column_exists then null; - end; \ No newline at end of file +/ \ No newline at end of file diff --git a/src/db/migration/V20190709_1445__mantis14533.sql b/src/db/migration/V20190709_1445__mantis14533.sql new file mode 100644 index 000000000..cb517e3d9 --- /dev/null +++ b/src/db/migration/V20190709_1445__mantis14533.sql @@ -0,0 +1,31 @@ +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (dhEmb VARCHAR2(25))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (CST00 VARCHAR2(2))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (CST20 VARCHAR2(2))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (CST45 VARCHAR2(2))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (CST90 VARCHAR2(2))'; +exception when column_exists then null; + end; +/ \ No newline at end of file diff --git a/src/db/migration/V20190709_1446__mantis14533.sql b/src/db/migration/V20190709_1446__mantis14533.sql new file mode 100644 index 000000000..49d14414a --- /dev/null +++ b/src/db/migration/V20190709_1446__mantis14533.sql @@ -0,0 +1,30 @@ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (CSTOutraUF VARCHAR2(2))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (CSTSN VARCHAR2(2))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (vBC00 VARCHAR2(15))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (pICMS00 VARCHAR2(5))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (vICMS00 VARCHAR2(15))'; +exception when column_exists then null; + end; +/ \ No newline at end of file diff --git a/src/db/migration/V20190709_1447__mantis14533.sql b/src/db/migration/V20190709_1447__mantis14533.sql new file mode 100644 index 000000000..acb8f3fe4 --- /dev/null +++ b/src/db/migration/V20190709_1447__mantis14533.sql @@ -0,0 +1,30 @@ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (vBC20 VARCHAR2(15))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (pICMS20 VARCHAR2(5))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (vICMS20 VARCHAR2(15))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (vBP VARCHAR2(15))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (vDesconto VARCHAR2(15))'; +exception when column_exists then null; + end; +/ \ No newline at end of file diff --git a/src/db/migration/V20190709_1448__mantis14533.sql b/src/db/migration/V20190709_1448__mantis14533.sql new file mode 100644 index 000000000..9daad3f6c --- /dev/null +++ b/src/db/migration/V20190709_1448__mantis14533.sql @@ -0,0 +1,30 @@ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (vPgto VARCHAR2(15))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (tpComp01 VARCHAR2(2))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (tpComp02 VARCHAR2(2))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (tpComp03 VARCHAR2(2))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (tpComp04 VARCHAR2(2))'; +exception when column_exists then null; + end; +/ \ No newline at end of file diff --git a/src/db/migration/V20190709_1449__mantis14533.sql b/src/db/migration/V20190709_1449__mantis14533.sql new file mode 100644 index 000000000..041af980a --- /dev/null +++ b/src/db/migration/V20190709_1449__mantis14533.sql @@ -0,0 +1,30 @@ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (tpComp05 VARCHAR2(2))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (tpComp06 VARCHAR2(2))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (tpComp99 VARCHAR2(2))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (vComp01 VARCHAR2(15))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (vComp02 VARCHAR2(15))'; +exception when column_exists then null; + end; +/ \ No newline at end of file diff --git a/src/db/migration/V20190709_1450__mantis14533.sql b/src/db/migration/V20190709_1450__mantis14533.sql new file mode 100644 index 000000000..4113f99dc --- /dev/null +++ b/src/db/migration/V20190709_1450__mantis14533.sql @@ -0,0 +1,30 @@ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (vComp03 VARCHAR2(15))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (vComp04 VARCHAR2(15))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (vComp05 VARCHAR2(15))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (vComp06 VARCHAR2(15))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (vComp99 VARCHAR2(15))'; +exception when column_exists then null; + end; +/ \ No newline at end of file diff --git a/src/db/migration/V20190709_1451__mantis14533.sql b/src/db/migration/V20190709_1451__mantis14533.sql new file mode 100644 index 000000000..30cfd2ff5 --- /dev/null +++ b/src/db/migration/V20190709_1451__mantis14533.sql @@ -0,0 +1,18 @@ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (PREDBC VARCHAR2(5))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (CSTOUTRAUF VARCHAR2(2))'; +exception when column_exists then null; + end; +/ +declare column_exists exception; + pragma exception_init (column_exists , -01430); + begin execute immediate 'ALTER TABLE BPE ADD (CSTSN VARCHAR2(2))'; +exception when column_exists then null; + end; +/ \ No newline at end of file