From 791515df24e27a0bda9e5645111dbe3bef57e6fc Mon Sep 17 00:00:00 2001 From: leonardo Date: Thu, 8 Aug 2019 19:50:54 +0000 Subject: [PATCH] 15274: Diminuir o tamanho do nome dos campos fixes bug#15274 dev:gleimar qua:leonardo Testado no banco de testes do uruguai, que estava dando problema. git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@96518 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../migration/V20190806_1408__mantis15274.sql | 25 --------------- .../migration/V20190808_1612__mantis15274.sql | 13 ++++++++ .../migration/V20190808_1614__mantis15274.sql | 31 +++++++++++++++++++ 3 files changed, 44 insertions(+), 25 deletions(-) delete mode 100644 src/db/migration/V20190806_1408__mantis15274.sql create mode 100644 src/db/migration/V20190808_1612__mantis15274.sql create mode 100644 src/db/migration/V20190808_1614__mantis15274.sql diff --git a/src/db/migration/V20190806_1408__mantis15274.sql b/src/db/migration/V20190806_1408__mantis15274.sql deleted file mode 100644 index 8b1d6c4a5..000000000 --- a/src/db/migration/V20190806_1408__mantis15274.sql +++ /dev/null @@ -1,25 +0,0 @@ -declare - object_exists exception; - except_00957 exception; - - pragma exception_init (object_exists , -01430); - pragma exception_init (except_00957 , -00957); -begin - execute immediate 'ALTER TABLE EMPRESA RENAME COLUMN INDIMPRIMELOGOBILHETEVENDAEMBARCADA TO INDIMPLOGOBILHETEVTAEMBARCADA'; - exception - when object_exists then null; - when except_00957 then null; -end; -/ -declare - object_exists exception; - except_00957 exception; - - pragma exception_init (object_exists , -01430); - pragma exception_init (except_00957 , -00957); -begin - execute immediate 'ALTER TABLE EMPRESA RENAME COLUMN INDIMPRIMERELFECHAMENTODETALHADOEMBARCADA TO INDIMPRIMERELFECHDETEMBARCADA'; - exception - when object_exists then null; - when except_00957 then null; -end; \ No newline at end of file diff --git a/src/db/migration/V20190808_1612__mantis15274.sql b/src/db/migration/V20190808_1612__mantis15274.sql new file mode 100644 index 000000000..af2efcf63 --- /dev/null +++ b/src/db/migration/V20190808_1612__mantis15274.sql @@ -0,0 +1,13 @@ +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 empresa set INDIMPLOGOBILHETEVTAEMBARCADA = INDIMPRIMELOGOBILHETEVENDAEMBARCADA, INDIMPRIMERELFECHDETEMBARCADA = INDIMPRIMERELFECHAMENTODETALHADOEMBARCADA'; + exception + when dup_val_on_index then null; + when except_02291 then null; + when others then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20190808_1614__mantis15274.sql b/src/db/migration/V20190808_1614__mantis15274.sql new file mode 100644 index 000000000..019ed14ca --- /dev/null +++ b/src/db/migration/V20190808_1614__mantis15274.sql @@ -0,0 +1,31 @@ +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); +begin + execute immediate 'ALTER TABLE EMPRESA ADD (INDIMPLOGOBILHETEVTAEMBARCADA NUMBER(1) )'; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 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); +begin + execute immediate 'ALTER TABLE EMPRESA ADD (INDIMPRIMERELFECHDETEMBARCADA NUMBER(1) )'; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end;