From b3b1880ded1eddc73c4c9cd1899ddf3c3648b67d Mon Sep 17 00:00:00 2001 From: leonardo Date: Fri, 18 Oct 2019 18:50:03 +0000 Subject: [PATCH] =?UTF-8?q?16516:=20Tabela=20de=20Pre=C3=A7o=20diferenciad?= =?UTF-8?q?a=20para=20VENDA=20EMBARCADA=20fixes=20bug#16516=20dev:valdir?= =?UTF-8?q?=20qua:cleverson?= 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@98341 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20191014_1648__mantis16516.sql | 16 ++++++++++++++++ .../migration/V20191018_1540__mantis16516.sql | 6 ++++++ 2 files changed, 22 insertions(+) create mode 100644 src/db/migration/V20191014_1648__mantis16516.sql create mode 100644 src/db/postgresql/migration/V20191018_1540__mantis16516.sql diff --git a/src/db/migration/V20191014_1648__mantis16516.sql b/src/db/migration/V20191014_1648__mantis16516.sql new file mode 100644 index 000000000..2f199e5d7 --- /dev/null +++ b/src/db/migration/V20191014_1648__mantis16516.sql @@ -0,0 +1,16 @@ +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 ADD (INDTABELAPRECOEMBARCADA NUMBER(1))'; + + 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/V20191018_1540__mantis16516.sql b/src/db/postgresql/migration/V20191018_1540__mantis16516.sql new file mode 100644 index 000000000..df631f1d7 --- /dev/null +++ b/src/db/postgresql/migration/V20191018_1540__mantis16516.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE EMPRESA ADD (INDTABELAPRECOEMBARCADA NUMBER(1)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file