From 9ebf16ece2164c4a4550d5cb77c34061eadb0ab7 Mon Sep 17 00:00:00 2001 From: thiago Date: Sat, 19 Jan 2019 17:05:35 +0000 Subject: [PATCH] bug#13358 dev:Thiago qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@89099 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../migration/V20190119_1457__mantis13358.sql | 27 +++++++++++++++++++ .../migration/V20190119_1457__mantis13358.sql | 13 +++++++++ 2 files changed, 40 insertions(+) create mode 100644 src/db/migration/V20190119_1457__mantis13358.sql create mode 100644 src/db/postgresql/migration/V20190119_1457__mantis13358.sql diff --git a/src/db/migration/V20190119_1457__mantis13358.sql b/src/db/migration/V20190119_1457__mantis13358.sql new file mode 100644 index 000000000..8e0d01a2e --- /dev/null +++ b/src/db/migration/V20190119_1457__mantis13358.sql @@ -0,0 +1,27 @@ +declare + + column_exists exception; + + pragma exception_init (column_exists , -01430); + +begin + + execute immediate 'ALTER TABLE FISCAL_J1 MODIFY ( NUMSERIENOTAFISCAL VARCHAR2(8) )'; + + exception when column_exists then null; + +end; +/ +declare + + column_exists exception; + + pragma exception_init (column_exists , -01430); + +begin + + execute immediate 'ALTER TABLE FISCAL_J2 MODIFY ( NUMSERIENOTAFISCAL VARCHAR2(8) )'; + + exception when column_exists then null; + +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20190119_1457__mantis13358.sql b/src/db/postgresql/migration/V20190119_1457__mantis13358.sql new file mode 100644 index 000000000..60a95259a --- /dev/null +++ b/src/db/postgresql/migration/V20190119_1457__mantis13358.sql @@ -0,0 +1,13 @@ +DO $$ +BEGIN +ALTER TABLE FISCAL_J1 MODIFY ( NUMSERIENOTAFISCAL VARCHAR2(8) ); +EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; + / +DO $$ +BEGIN +ALTER TABLE FISCAL_J2 MODIFY ( NUMSERIENOTAFISCAL VARCHAR2(8) ); +EXCEPTION WHEN duplicate_column THEN NULL; +END +$$;