From 9c5388f8598ce94afdd5bb2225daed5a1b185523 Mon Sep 17 00:00:00 2001 From: walace Date: Fri, 5 Apr 2019 23:24:32 +0000 Subject: [PATCH] fixes bug#13845 qua:renato dev:lucas git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@91662 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20190405_1744__mantis13845.sql | 8 ++++++++ .../migration/V20190405_1745__mantis13845.sql | 15 +++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 src/db/migration/V20190405_1744__mantis13845.sql create mode 100644 src/db/postgresql/migration/V20190405_1745__mantis13845.sql diff --git a/src/db/migration/V20190405_1744__mantis13845.sql b/src/db/migration/V20190405_1744__mantis13845.sql new file mode 100644 index 000000000..262e06ca3 --- /dev/null +++ b/src/db/migration/V20190405_1744__mantis13845.sql @@ -0,0 +1,8 @@ +declare + dup_val_on_index exception; + pragma exception_init (dup_val_on_index , -00001); +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 VIAGEM > RELATORIO APROVEITAMENTO'', ''COM.RJCONSULTORES.VENTABOLETOS.GUI.VENTA.MENU.ITENS.ITEMMENURELATORIOAPROVEITAMENTO'',1,SYSDATE,-1)'; + exception when dup_val_on_index then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20190405_1745__mantis13845.sql b/src/db/postgresql/migration/V20190405_1745__mantis13845.sql new file mode 100644 index 000000000..4d7ef15ad --- /dev/null +++ b/src/db/postgresql/migration/V20190405_1745__mantis13845.sql @@ -0,0 +1,15 @@ +DO $$ +BEGIN + insert into funcion_sistema (funcionsistema_id, sistema_id, nombfuncion, descruta, activo, fecmodif, usuario_id) + values ( + nextval('funcion_sistema_seq'), + 1, + 'VDA > MAPA VIAGEM > RELATORIO APROVEITAMENTO', + 'COM.RJCONSULTORES.VENTABOLETOS.GUI.VENTA.MENU.ITENS.ITEMMENURELATORIOAPROVEITAMENTO', + 1, + now(), + 1); + + EXCEPTION WHEN unique_violation THEN NULL; +END +$$; \ No newline at end of file