From 8cabb0853b19e66feab3e0d8980abfa62f2e00fd Mon Sep 17 00:00:00 2001 From: walace Date: Thu, 8 Apr 2021 15:09:06 +0000 Subject: [PATCH] fixes bug#21827 qua:wallyson dev: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@106128 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../migration/V20201215_1716__2_mantis20807.sql | 7 +++++++ src/db/migration/V20210408_1507__mantis21827.sql | 15 +++++++++++++++ .../migration/V20210408_1145__mantis21827.sql | 9 +++++++++ 3 files changed, 31 insertions(+) create mode 100644 src/db/migration/V20201215_1716__2_mantis20807.sql create mode 100644 src/db/migration/V20210408_1507__mantis21827.sql create mode 100644 src/db/postgresql/migration/V20210408_1145__mantis21827.sql diff --git a/src/db/migration/V20201215_1716__2_mantis20807.sql b/src/db/migration/V20201215_1716__2_mantis20807.sql new file mode 100644 index 000000000..bc81f3c6f --- /dev/null +++ b/src/db/migration/V20201215_1716__2_mantis20807.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'update custom set tipo = ''1'', sistema = ''1'' where chave = ''MODCLI_ExibirEstoquePorPuloSequencia'''; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20210408_1507__mantis21827.sql b/src/db/migration/V20210408_1507__mantis21827.sql new file mode 100644 index 000000000..f850ab5e2 --- /dev/null +++ b/src/db/migration/V20210408_1507__mantis21827.sql @@ -0,0 +1,15 @@ +declare + dup_val_on_index exception; + except_02291 exception; + + pragma exception_init (dup_val_on_index , -00001); + pragma exception_init (except_02291 , -02291); +begin + execute immediate 'INSERT INTO FUNCION_SISTEMA (FUNCIONSISTEMA_ID, SISTEMA_ID, NOMBFUNCION, DESCRUTA, ACTIVO, FECMODIF, USUARIO_ID) + VALUES (FUNCION_SISTEMA_SEQ.nextval, 1, ''VDA > MAPA DE VIAGEM >> RELATORIO TAXAS'', + ''COM.RJCONSULTORES.VENTABOLETOS.GUI.VENTA.MENU.ITENS.ITEMMENURELATORIOTAXAS'', 1, + SYSDATE, -1)'; + exception + when dup_val_on_index then null; + when except_02291 then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20210408_1145__mantis21827.sql b/src/db/postgresql/migration/V20210408_1145__mantis21827.sql new file mode 100644 index 000000000..7c79d65be --- /dev/null +++ b/src/db/postgresql/migration/V20210408_1145__mantis21827.sql @@ -0,0 +1,9 @@ + +DO $$ +BEGIN + insert into funcion_sistema (funcionsistema_id,sistema_id,nombfuncion,descruta,activo,fecmodif,usuario_id) values + (nextval('funcion_sistema_seq'),2,'VDA > MAPA DE VIAGEM >> RELATORIO TAXAS','COM.RJCONSULTORES.VENTABOLETOS.GUI.VENTA.MENU.ITENS.ITEMMENURELATORIOTAXAS',1,now(),1); + + EXCEPTION WHEN unique_violation THEN NULL; +END +$$; \ No newline at end of file