From 71db0ee8098825c025fd14a75b1b7a5b26647fa9 Mon Sep 17 00:00:00 2001 From: fabio Date: Tue, 2 Jun 2020 18:44:16 +0000 Subject: [PATCH] fixes bug#19391 dev: qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@101929 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../migration/V20200602_1118__mantis19391.sql | 25 +++++++++++++++++++ .../migration/V20200602_1118__mantis19391.sql | 25 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 src/db/migration/V20200602_1118__mantis19391.sql create mode 100644 src/db/postgresql/migration/V20200602_1118__mantis19391.sql diff --git a/src/db/migration/V20200602_1118__mantis19391.sql b/src/db/migration/V20200602_1118__mantis19391.sql new file mode 100644 index 000000000..3a623dc81 --- /dev/null +++ b/src/db/migration/V20200602_1118__mantis19391.sql @@ -0,0 +1,25 @@ +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 'UPDATE PERFIL_FUNCION SET ACTIVO = 0 where FUNCIONSISTEMA_ID in ( SELECT FUNCIONSISTEMA_ID FROM FUNCION_SISTEMA where DESCRUTA like ''%MOVIMENTACIONBILHETES%'' )'; + exception + when dup_val_on_index then null; + when except_02291 then null; +end; +/ +--LIMPA O COLUNA +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 'UPDATE FUNCIONSISTEMA_ID SET ACTIVO = 0 FROM FUNCION_SISTEMA where DESCRUTA like ''%MOVIMENTACIONBILHETES%'' '; + exception + when dup_val_on_index then null; + when except_02291 then null; +end; + diff --git a/src/db/postgresql/migration/V20200602_1118__mantis19391.sql b/src/db/postgresql/migration/V20200602_1118__mantis19391.sql new file mode 100644 index 000000000..3a623dc81 --- /dev/null +++ b/src/db/postgresql/migration/V20200602_1118__mantis19391.sql @@ -0,0 +1,25 @@ +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 'UPDATE PERFIL_FUNCION SET ACTIVO = 0 where FUNCIONSISTEMA_ID in ( SELECT FUNCIONSISTEMA_ID FROM FUNCION_SISTEMA where DESCRUTA like ''%MOVIMENTACIONBILHETES%'' )'; + exception + when dup_val_on_index then null; + when except_02291 then null; +end; +/ +--LIMPA O COLUNA +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 'UPDATE FUNCIONSISTEMA_ID SET ACTIVO = 0 FROM FUNCION_SISTEMA where DESCRUTA like ''%MOVIMENTACIONBILHETES%'' '; + exception + when dup_val_on_index then null; + when except_02291 then null; +end; +