From 484eff08acfb6c9972fb6a0a6c9b3baf1f906225 Mon Sep 17 00:00:00 2001 From: lucassilverio Date: Thu, 21 May 2020 12:20:03 +0000 Subject: [PATCH] fixes bug#19260 dev: xxx qua: xxx Corrigindo script git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@101710 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20200520_0934__mantis19260.sql | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/db/migration/V20200520_0934__mantis19260.sql b/src/db/migration/V20200520_0934__mantis19260.sql index aede5b71b..dd77551cb 100644 --- a/src/db/migration/V20200520_0934__mantis19260.sql +++ b/src/db/migration/V20200520_0934__mantis19260.sql @@ -7,9 +7,13 @@ begin end; declare - object_exists exception; - pragma exception_init (object_exists , -01430); + 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 CATEGORIA SET INDVENDEAPI = 1 WHERE CATEGORIA_ID = 1'; - exception when object_exists then null; + execute immediate 'UPDATE CATEGORIA SET INDVENDEAPI = 1 WHERE CATEGORIA_ID = 1'; + exception + when dup_val_on_index then null; + when except_02291 then null; end; \ No newline at end of file