From 2b1fbeded813dacecbc2dc21bfd83fe20f049e92 Mon Sep 17 00:00:00 2001 From: alberto Date: Thu, 19 Dec 2019 14:49:59 +0000 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=A3o=20script=20bug#16767=20dev:t?= =?UTF-8?q?revezani=20qua:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@99423 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../migration/V20191025_1003__mantis16767.sql | 59 ++++++++++++++++++- 1 file changed, 56 insertions(+), 3 deletions(-) diff --git a/src/db/migration/V20191025_1003__mantis16767.sql b/src/db/migration/V20191025_1003__mantis16767.sql index 1c437f3d8..7d142d0fa 100644 --- a/src/db/migration/V20191025_1003__mantis16767.sql +++ b/src/db/migration/V20191025_1003__mantis16767.sql @@ -1,3 +1,56 @@ -ALTER TABLE BPE MODIFY BPE_ID NUMBER(12,0); -ALTER TABLE BPE MODIFY BPEEVENTO_ID NUMBER(12,0); -ALTER TABLE BPE MODIFY BPESUBSTITUICAO_ID NUMBER(12,0); \ No newline at end of file +declare + object_exists exception; + except_01451 exception; + except_01442 exception; + + pragma exception_init (object_exists , -01430); + pragma exception_init (except_01451 , -01451); + pragma exception_init (except_01442 , -01442); + pragma exception_init (except_01440 , -01440); +begin + execute immediate 'ALTER TABLE BPE MODIFY BPE_ID NUMBER(22,0)'; + + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; + when except_01440 then null; +end; +/ +declare + object_exists exception; + except_01451 exception; + except_01442 exception; + + pragma exception_init (object_exists , -01430); + pragma exception_init (except_01451 , -01451); + pragma exception_init (except_01442 , -01442); + pragma exception_init (except_01440 , -01440); +begin + execute immediate 'ALTER TABLE BPE MODIFY BPEEVENTO_ID NUMBER(22,0)'; + + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; + when except_01440 then null; +end; +/ +declare + object_exists exception; + except_01451 exception; + except_01442 exception; + + pragma exception_init (object_exists , -01430); + pragma exception_init (except_01451 , -01451); + pragma exception_init (except_01442 , -01442); + pragma exception_init (except_01440 , -01440); +begin + execute immediate 'ALTER TABLE BPE MODIFY BPESUBSTITUICAO_ID NUMBER(22,0)'; + + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; + when except_01440 then null; +end;