From f9662205543b0ef4197cef3c4269dd815abf66fc Mon Sep 17 00:00:00 2001 From: wilian Date: Tue, 11 Aug 2020 22:21:53 +0000 Subject: [PATCH] fixes bug#17367 dev:thiago qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@102873 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../migration/V20200811_1108__mantis17367.sql | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/db/migration/V20200811_1108__mantis17367.sql 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