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 +$$;