From c03f73a5b2ea1e34e9960fc3b067442132a9483b Mon Sep 17 00:00:00 2001 From: fabio Date: Mon, 11 Sep 2017 18:16:51 +0000 Subject: [PATCH] Fixes bug #9798 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@73665 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20170911_1505__mantis9798.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/db/migration/V20170911_1505__mantis9798.sql 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