From 2e431bd357a261c5df910bf0a14d6b29fd7e8243 Mon Sep 17 00:00:00 2001 From: "guilherme.lopes" Date: Fri, 13 Mar 2020 13:17:56 +0000 Subject: [PATCH] =?UTF-8?q?fixes=20bug#18490=20dev:Daniel.Zauli=20qua:=20I?= =?UTF-8?q?nclus=C3=A3o=20do=20SQL=20no=20projeto=20Flyway?= 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@100714 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20200313_1000__mantis18490.sql | 7 +++++++ .../postgresql/migration/V20200313_1000__mantis18490.sql | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100644 src/db/migration/V20200313_1000__mantis18490.sql create mode 100644 src/db/postgresql/migration/V20200313_1000__mantis18490.sql diff --git a/src/db/migration/V20200313_1000__mantis18490.sql b/src/db/migration/V20200313_1000__mantis18490.sql new file mode 100644 index 000000000..cbab5f9fa --- /dev/null +++ b/src/db/migration/V20200313_1000__mantis18490.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE PUNTO_VENTA MODIFY (MOTIVONAOINTEGRADOAG VARCHAR2(1000 BYTE))'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20200313_1000__mantis18490.sql b/src/db/postgresql/migration/V20200313_1000__mantis18490.sql new file mode 100644 index 000000000..875e0e86b --- /dev/null +++ b/src/db/postgresql/migration/V20200313_1000__mantis18490.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE PUNTO_VENTA ALTER COLUMN MOTIVONAOINTEGRADOAG TYPE VARCHAR(1000); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$;