diff --git a/src/db/migration/V20200811_1108__mantis17367.sql b/src/db/migration/V20200811_1108__mantis17367.sql new file mode 100644 index 000000000..37686f613 --- /dev/null +++ b/src/db/migration/V20200811_1108__mantis17367.sql @@ -0,0 +1,26 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CAJA_DIVERSOS ADD (NUMSERIE_BPE VARCHAR(3), NUM_BPE VARCHAR(9), BPE_ID NUMBER(7,0))'; + exception when column_exists then null; +end; +/ +declare + object_exists exception; + except_02275 exception; + except_02270 exception; + except_02261 exception; + + pragma exception_init (object_exists , -01430); + pragma exception_init (except_02275 , -02275); + pragma exception_init (except_02270 , -02270); + pragma exception_init (except_02261 , -02261); +begin + execute immediate 'ALTER TABLE CAJA_DIVERSOS ADD CONSTRAINT BPE_ID_FK FOREIGN KEY(BPE_ID) REFERENCES BPE(BPE_ID)'; + exception + when object_exists then null; + when except_02275 then null; + when except_02270 then null; + when except_02261 then null; +end; \ No newline at end of file