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