diff --git a/src/db/migration/V20170911_1505__mantis9798.sql b/src/db/migration/V20170911_1505__mantis9798.sql new file mode 100644 index 000000000..a6646c149 --- /dev/null +++ b/src/db/migration/V20170911_1505__mantis9798.sql @@ -0,0 +1,15 @@ +--drop constraint se existe +DECLARE +itemExists NUMBER; +BEGIN + itemExists := 0; + +SELECT COUNT(CONSTRAINT_NAME) INTO itemExists +FROM ALL_CONSTRAINTS +WHERE UPPER(CONSTRAINT_NAME) = UPPER('PRECIO_VENTAJA__UN'); + +IF itemExists > 0 THEN +EXECUTE IMMEDIATE 'ALTER TABLE PRECIO_VENTAJA DROP CONSTRAINT PRECIO_VENTAJA__UN'; +END IF; + +END; \ No newline at end of file