diff --git a/src/db/migration/V20170913_1116__mantis9796.sql b/src/db/migration/V20170913_1116__mantis9796.sql new file mode 100644 index 000000000..f2d013db9 --- /dev/null +++ b/src/db/migration/V20170913_1116__mantis9796.sql @@ -0,0 +1,17 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE AIDF ADD (PUNTOVENTA_ID NUMBER(7))'; + exception when column_exists then null; +end; + +// + +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE AIDF ADD CONSTRAINT PUNTOVENTA_AIDF FOREIGN KEY (PUNTOVENTA_ID) REFERENCES PUNTO_VENTA (PUNTOVENTA_ID) ENABLE'; + exception when column_exists then null; +end;