From ff5508b698df11af889f9c5d9d3a782b672ce679 Mon Sep 17 00:00:00 2001 From: wilian Date: Tue, 28 Jan 2020 18:19:21 +0000 Subject: [PATCH] bug#16789 dev:thiago qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@99940 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20200124_1559__mantis16789.sql | 7 +++++++ src/db/migration/V20200124_1600__mantis16789.sql | 6 ++++++ .../postgresql/migration/V20200124_1559__mantis16789.sql | 6 ++++++ .../postgresql/migration/V20200124_1600__mantis16789.sql | 8 ++++++++ 4 files changed, 27 insertions(+) create mode 100644 src/db/migration/V20200124_1559__mantis16789.sql create mode 100644 src/db/migration/V20200124_1600__mantis16789.sql create mode 100644 src/db/postgresql/migration/V20200124_1559__mantis16789.sql create mode 100644 src/db/postgresql/migration/V20200124_1600__mantis16789.sql diff --git a/src/db/migration/V20200124_1559__mantis16789.sql b/src/db/migration/V20200124_1559__mantis16789.sql new file mode 100644 index 000000000..8f213b850 --- /dev/null +++ b/src/db/migration/V20200124_1559__mantis16789.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO ADD (INDEMITESOMENTECUPOMEMBARQUE NUMBER(1), QTDE_VIAS_CUPOM_EMBARQUE NUMBER(5))'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20200124_1600__mantis16789.sql b/src/db/migration/V20200124_1600__mantis16789.sql new file mode 100644 index 000000000..65b2da535 --- /dev/null +++ b/src/db/migration/V20200124_1600__mantis16789.sql @@ -0,0 +1,6 @@ +declare +begin + execute immediate 'insert into funcion_sistema (funcionsistema_id,sistema_id,nombfuncion,descruta,activo,fecmodif,usuario_id) + values (funcion_sistema_seq.nextval,1,''ADM > CONFIGURACAO COMERCIAL > CONFIG. TIPO PASSAGEM > EMITE SOMENTE CUPOM EMBARQUE'',''COM.RJCONSULTORES.ADMINISTRACION.GUI.CONFIGURACIONECCOMERCIALES.CONFIGTIPOPASSAGEM.EMITESOMENTECPEMB'',1,sysdate,1)'; + exception when others then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20200124_1559__mantis16789.sql b/src/db/postgresql/migration/V20200124_1559__mantis16789.sql new file mode 100644 index 000000000..888187de5 --- /dev/null +++ b/src/db/postgresql/migration/V20200124_1559__mantis16789.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE CATEGORIA_DESCUENTO ADD (INDEMITESOMENTECUPOMEMBARQUE NUMBER(1), QTDE_VIAS_CUPOM_EMBARQUE NUMBER(5)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20200124_1600__mantis16789.sql b/src/db/postgresql/migration/V20200124_1600__mantis16789.sql new file mode 100644 index 000000000..8667c6232 --- /dev/null +++ b/src/db/postgresql/migration/V20200124_1600__mantis16789.sql @@ -0,0 +1,8 @@ +DO $$ +BEGIN + insert into funcion_sistema (funcionsistema_id,sistema_id,nombfuncion,descruta,activo,fecmodif,usuario_id) values + (nextval('funcion_sistema_seq'),1,'ADM > CONFIGURACAO COMERCIAL > CONFIG. TIPO PASSAGEM > EMITE SOMENTE EMITE SOMENTE CUPOM EMBARQUE','COM.RJCONSULTORES.ADMINISTRACION.GUI.CONFIGURACIONECCOMERCIALES.CONFIGTIPOPASSAGEM.EMITESOMENTECPEMB',1,now(),1); + + EXCEPTION WHEN unique_violation THEN NULL; +END +$$; \ No newline at end of file