From e7bd3a942b1581d92704aad0c0e0e1d092d48957 Mon Sep 17 00:00:00 2001 From: valdir Date: Thu, 30 Jun 2022 19:55:58 +0000 Subject: [PATCH] =?UTF-8?q?0024642:=20GAP03-2022=5FSeguro=20opcional=20-?= =?UTF-8?q?=202=C2=AA=20via=20seguro=20bug#24642=20dev:valdevir=20qua:?= 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@113084 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20220630_0923__mantis24642.sql | 7 +++++++ .../postgresql/migration/V20220630_0923__mantis24642.sql | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100644 src/db/migration/V20220630_0923__mantis24642.sql create mode 100644 src/db/postgresql/migration/V20220630_0923__mantis24642.sql diff --git a/src/db/migration/V20220630_0923__mantis24642.sql b/src/db/migration/V20220630_0923__mantis24642.sql new file mode 100644 index 000000000..8da1d996c --- /dev/null +++ b/src/db/migration/V20220630_0923__mantis24642.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE EMPRESA ADD INDSEGUNDAVIASEGOPCIONAL NUMBER(1,0)'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220630_0923__mantis24642.sql b/src/db/postgresql/migration/V20220630_0923__mantis24642.sql new file mode 100644 index 000000000..6f24429c1 --- /dev/null +++ b/src/db/postgresql/migration/V20220630_0923__mantis24642.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE EMPRESA ADD INDSEGUNDAVIASEGOPCIONAL NUMBER(1,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file