From 0c6996efd3482bfba6582b2392a539ec2f8d2f07 Mon Sep 17 00:00:00 2001 From: valdir Date: Thu, 16 Jul 2020 20:35:03 +0000 Subject: [PATCH] 0019537: GLPI - 25705 - Regras ARTEP Customizadas no SRVP para serem incorporadas no TOTALBUS bug#19537 dev:valdevir qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@102487 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../migration/V20200710_1501__mantis19537.sql | 21 ++++++++ .../migration/V20200715_1038_mantis19537.sql | 48 +++++++++++++++++++ .../migration/V20200710_1501__mantis19537.sql | 15 ++++++ .../migration/V20200715_1038_mantis19537.sql | 41 ++++++++++++++++ 4 files changed, 125 insertions(+) create mode 100644 src/db/migration/V20200710_1501__mantis19537.sql create mode 100644 src/db/migration/V20200715_1038_mantis19537.sql create mode 100644 src/db/postgresql/migration/V20200710_1501__mantis19537.sql create mode 100644 src/db/postgresql/migration/V20200715_1038_mantis19537.sql diff --git a/src/db/migration/V20200710_1501__mantis19537.sql b/src/db/migration/V20200710_1501__mantis19537.sql new file mode 100644 index 000000000..8f07357af --- /dev/null +++ b/src/db/migration/V20200710_1501__mantis19537.sql @@ -0,0 +1,21 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE ORGAO_CANCELACION ADD TIEMPOLIMITE_MIN NUMBER(5,0)'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE ORGAO_CANCELACION ADD TIEMPOLIMITECAMBIO_MIN NUMBER(5,0)'; + exception when column_exists then null; +end; + + + + + + diff --git a/src/db/migration/V20200715_1038_mantis19537.sql b/src/db/migration/V20200715_1038_mantis19537.sql new file mode 100644 index 000000000..75f7eae6d --- /dev/null +++ b/src/db/migration/V20200715_1038_mantis19537.sql @@ -0,0 +1,48 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE ORGAO_CANCELACION ADD TEMPOLIMITE_APOS_SAIDA_H NUMBER(5,0)'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE ORGAO_CANCELACION ADD TEMPOLIMITE_APOS_SAIDA_MIN NUMBER(5,0)'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE ORGAO_CANCELACION ADD TROCA_MESMO_DIA_ANTES_H NUMBER(5,0)'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE ORGAO_CANCELACION ADD TROCA_MESMO_DIA_ANTES_MIN NUMBER(5,0)'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE ORGAO_CANCELACION ADD TROCA_MESMO_DIA_APOS_H NUMBER(5,0)'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE ORGAO_CANCELACION ADD TROCA_MESMO_DIA_APOS_MIN NUMBER(5,0)'; + exception when column_exists then null; +end; +/ diff --git a/src/db/postgresql/migration/V20200710_1501__mantis19537.sql b/src/db/postgresql/migration/V20200710_1501__mantis19537.sql new file mode 100644 index 000000000..efed91b43 --- /dev/null +++ b/src/db/postgresql/migration/V20200710_1501__mantis19537.sql @@ -0,0 +1,15 @@ +DO $$ +BEGIN + ALTER TABLE ORGAO_CANCELACION ADD TIEMPOLIMITE_MIN NUMBER(5,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + ALTER TABLE ORGAO_CANCELACION ADD TIEMPOLIMITECAMBIO_MIN NUMBER(5,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; + + diff --git a/src/db/postgresql/migration/V20200715_1038_mantis19537.sql b/src/db/postgresql/migration/V20200715_1038_mantis19537.sql new file mode 100644 index 000000000..aaf95ffad --- /dev/null +++ b/src/db/postgresql/migration/V20200715_1038_mantis19537.sql @@ -0,0 +1,41 @@ +DO $$ +BEGIN + ALTER TABLE ORGAO_CANCELACION ADD TEMPOLIMITE_APOS_SAIDA_H NUMBER(5,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + ALTER TABLE ORGAO_CANCELACION ADD TEMPOLIMITE_APOS_SAIDA_MIN NUMBER(5,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + ALTER TABLE ORGAO_CANCELACION ADD TROCA_MESMO_DIA_ANTES_H NUMBER(5,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + ALTER TABLE ORGAO_CANCELACION ADD TROCA_MESMO_DIA_ANTES_MIN NUMBER(5,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + ALTER TABLE ORGAO_CANCELACION ADD TROCA_MESMO_DIA_APOS_H NUMBER(5,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + ALTER TABLE ORGAO_CANCELACION ADD TROCA_MESMO_DIA_APOS_MIN NUMBER(5,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$;