From 91a7c5d8209e54ca5e84e04f4330f9c5b03fef28 Mon Sep 17 00:00:00 2001 From: fabio Date: Wed, 12 Sep 2018 21:08:26 +0000 Subject: [PATCH] Fixes bug#12005 dev: Lucas qua: Renato git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@85304 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20180814_1625__mantis11684.sql | 9 +++++++++ .../postgresql/migration/V20180814_1625__mantis11684.sql | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 src/db/migration/V20180814_1625__mantis11684.sql create mode 100644 src/db/postgresql/migration/V20180814_1625__mantis11684.sql diff --git a/src/db/migration/V20180814_1625__mantis11684.sql b/src/db/migration/V20180814_1625__mantis11684.sql new file mode 100644 index 000000000..32f1bb138 --- /dev/null +++ b/src/db/migration/V20180814_1625__mantis11684.sql @@ -0,0 +1,9 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CATEGORIA ADD (INTEGRADOTOTVS NUMBER(1,0))'; + execute immediate 'ALTER TABLE CATEGORIA ADD (ERRO VARCHAR2(4000 BYTE))'; + exception when column_exists then null; +end; +/ diff --git a/src/db/postgresql/migration/V20180814_1625__mantis11684.sql b/src/db/postgresql/migration/V20180814_1625__mantis11684.sql new file mode 100644 index 000000000..3f4cc986c --- /dev/null +++ b/src/db/postgresql/migration/V20180814_1625__mantis11684.sql @@ -0,0 +1,8 @@ +DO $$ +BEGIN + ALTER TABLE CATEGORIA ADD COLUMN INTEGRADOTOTVS NUMERIC(1,0); + ALTER TABLE CATEGORIA ADD COLUMN ERRO VARCHAR(4000); + + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$;