From 6d7dc054df4459426cd2200bc072c38650d456a2 Mon Sep 17 00:00:00 2001 From: wilian Date: Thu, 3 Dec 2020 20:02:19 +0000 Subject: [PATCH] fixes bug#21048 dev:wilian qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@104589 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20201203_1036__mantis21048.sql | 7 +++++++ .../postgresql/migration/V20201203_1036__mantis21048.sql | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100644 src/db/migration/V20201203_1036__mantis21048.sql create mode 100644 src/db/postgresql/migration/V20201203_1036__mantis21048.sql diff --git a/src/db/migration/V20201203_1036__mantis21048.sql b/src/db/migration/V20201203_1036__mantis21048.sql new file mode 100644 index 000000000..1168a56c6 --- /dev/null +++ b/src/db/migration/V20201203_1036__mantis21048.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE EMPRESA ADD CODCONTPREVIDENCIA VARCHAR(8)'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20201203_1036__mantis21048.sql b/src/db/postgresql/migration/V20201203_1036__mantis21048.sql new file mode 100644 index 000000000..286ac46cf --- /dev/null +++ b/src/db/postgresql/migration/V20201203_1036__mantis21048.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE EMPRESA ADD CODCONTPREVIDENCIA VARCHAR(8); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file