From 9442a2a43c709f20714e7f0e2305e36fe3d4c9ef Mon Sep 17 00:00:00 2001 From: "lucas.taia" Date: Thu, 25 May 2017 19:03:18 +0000 Subject: [PATCH] fixes bug #9098 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@69310 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20170525_1528__mantis9028.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/db/migration/V20170525_1528__mantis9028.sql diff --git a/src/db/migration/V20170525_1528__mantis9028.sql b/src/db/migration/V20170525_1528__mantis9028.sql new file mode 100644 index 000000000..6cb7ac6a9 --- /dev/null +++ b/src/db/migration/V20170525_1528__mantis9028.sql @@ -0,0 +1,16 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'ALTER TABLE TARJETA_CREDITO ADD (EMPRESA_ID NUMBER(7))'; + exception when object_exists then null; +end; +/ + +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'ALTER TABLE TARJETA_CREDITO ADD CONSTRAINT TARJETA_CREDITO_FK_EMPRESA FOREIGN KEY (EMPRESA_ID) REFERENCES EMPRESA (EMPRESA_ID) ENABLE'; + exception when object_exists then null; +end;