From c25a2075535c75c2bdac079150e44739b26be8c7 Mon Sep 17 00:00:00 2001 From: valdir Date: Mon, 23 Sep 2019 17:12:47 +0000 Subject: [PATCH] =?UTF-8?q?0015249:=20Campo=20Imposto=20Obrigat=C3=B3rio?= =?UTF-8?q?=200015219:=20LEI=20N=C2=BA=208.405=20/=20Rio=20de=20Janeiro=20?= =?UTF-8?q?-=20Fundo=20de=20combate=20a=20pobreza=20bug#15219=20bug#15249?= =?UTF-8?q?=20dev:leonardo=20qua:junea?= 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@97769 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20190923_1117__mantis15219.sql | 15 +++++++++++++++ .../migration/V20190923_1117__mantis15219.sql | 9 +++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/db/migration/V20190923_1117__mantis15219.sql create mode 100644 src/db/postgresql/migration/V20190923_1117__mantis15219.sql diff --git a/src/db/migration/V20190923_1117__mantis15219.sql b/src/db/migration/V20190923_1117__mantis15219.sql new file mode 100644 index 000000000..d49d39e9f --- /dev/null +++ b/src/db/migration/V20190923_1117__mantis15219.sql @@ -0,0 +1,15 @@ +declare + object_exists exception; + except_01451 exception; + except_01442 exception; + + pragma exception_init (object_exists , -01430); + pragma exception_init (except_01451 , -01451); + pragma exception_init (except_01442 , -01442); +begin + execute immediate 'ALTER TABLE EMPRESA_IMPOSTO ADD (PORCFECP NUMBER(7,2))'; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20190923_1117__mantis15219.sql b/src/db/postgresql/migration/V20190923_1117__mantis15219.sql new file mode 100644 index 000000000..cfa44295c --- /dev/null +++ b/src/db/postgresql/migration/V20190923_1117__mantis15219.sql @@ -0,0 +1,9 @@ +DO $$ +BEGIN + ALTER TABLE EMPRESA_IMPOSTO ADD (PORCFECP NUMBER(7,2)); + EXCEPTION + WHEN duplicate_table THEN NULL; + WHEN duplicate_object THEN NULL; + WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file