From ec762185887c2dc7b06a8780fc3f16153ee20d9e Mon Sep 17 00:00:00 2001 From: walace Date: Mon, 24 Sep 2018 20:10:24 +0000 Subject: [PATCH] =?UTF-8?q?criado=20a=20customiza=C3=A7=C3=A3o=20para=20ve?= =?UTF-8?q?nda=20em=20p=C3=A9,=20sentado=20por=20servi=C3=A7o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes bug#11741 dev:lucas qua:marcelo git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@85599 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/com/rjconsultores/ventaboletos/FlyWay.java | 2 +- src/db/migration/V20180824_1021__mantis11741.sql | 9 ++++++++- .../migration/V20180824_1021__mantis11741.sql | 15 +++++++-------- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/com/rjconsultores/ventaboletos/FlyWay.java b/src/com/rjconsultores/ventaboletos/FlyWay.java index 87e0d14a0..a4e56a052 100644 --- a/src/com/rjconsultores/ventaboletos/FlyWay.java +++ b/src/com/rjconsultores/ventaboletos/FlyWay.java @@ -121,6 +121,6 @@ public class FlyWay { flyway.setOutOfOrder(true); flyway.setBaselineOnMigrate(true); - flyway.migrate(); + //flyway.migrate(); } } diff --git a/src/db/migration/V20180824_1021__mantis11741.sql b/src/db/migration/V20180824_1021__mantis11741.sql index 1a28e03dc..cc70a1e4b 100644 --- a/src/db/migration/V20180824_1021__mantis11741.sql +++ b/src/db/migration/V20180824_1021__mantis11741.sql @@ -5,4 +5,11 @@ begin execute immediate 'ALTER TABLE ESQUEMA_TRAMO ADD (TIPO_PASSAGEM VARCHAR2(1))'; exception when column_exists then null; end; -/ \ No newline at end of file +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CORRIDA_TRAMO ADD (TIPO_PASSAGEM VARCHAR2(1))'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20180824_1021__mantis11741.sql b/src/db/postgresql/migration/V20180824_1021__mantis11741.sql index 1a28e03dc..de5f1f342 100644 --- a/src/db/postgresql/migration/V20180824_1021__mantis11741.sql +++ b/src/db/postgresql/migration/V20180824_1021__mantis11741.sql @@ -1,8 +1,7 @@ -declare - column_exists exception; - pragma exception_init (column_exists , -01430); -begin - execute immediate 'ALTER TABLE ESQUEMA_TRAMO ADD (TIPO_PASSAGEM VARCHAR2(1))'; - exception when column_exists then null; -end; -/ \ No newline at end of file +DO $$ +BEGIN + ALTER TABLE ESQUEMA_TRAMO ADD (TIPO_PASSAGEM VARCHAR2(1)); + ALTER TABLE CORRIDA_TRAMO ADD (TIPO_PASSAGEM VARCHAR2(1)) + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file