fixes bug#13369
dev:fabio qua:Renato git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@89859 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
e92cb1cfe3
commit
cdb2acc4e1
|
@ -0,0 +1,22 @@
|
|||
--drop index se existe
|
||||
DECLARE
|
||||
itemExists NUMBER;
|
||||
BEGIN
|
||||
itemExists := 0;
|
||||
|
||||
SELECT COUNT(INDEX_NAME) INTO itemExists
|
||||
FROM ALL_INDEXES
|
||||
WHERE UPPER(INDEX_NAME) LIKE UPPER('PRECIO_VENTAJA__UN');
|
||||
|
||||
|
||||
IF itemExists > 0 THEN
|
||||
begin
|
||||
EXECUTE IMMEDIATE 'drop index PRECIO_VENTAJA__UN';
|
||||
EXECUTE IMMEDIATE 'ALTER TABLE PRECIO_VENTAJA ADD CONSTRAINT PRECIO_VENTAJA_PK PRIMARY KEY (PRECIOVENTAJA_ID )';
|
||||
exception when others then null;
|
||||
end;
|
||||
END IF;
|
||||
|
||||
END;
|
||||
|
||||
|
Loading…
Reference in New Issue