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;