fixes bug#11304

dev: julio
qua: julio

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@82443 d1611594-4594-4d17-8e1d-87c2c4800839
master
julio 2018-06-06 19:11:45 +00:00
parent 97a68f9ed2
commit 5e4f5844e7
1 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,41 @@
declare
table_exists exception;
pragma exception_init (table_exists , -00955);
begin
execute immediate
'CREATE UNIQUE INDEX PK__BPE__BPE_ID ON BPE ("BPE_ID")';
exception when table_exists then null;
end;
/
declare
table_exists exception;
pragma exception_init (table_exists , -00955);
begin
execute immediate
'CREATE INDEX IDX__BPE_BOLETO ON BPE ("BOLETO_ID")';
exception when table_exists then null;
end;
/
declare
table_exists exception;
pragma exception_init (table_exists , -00955);
begin
execute immediate
'CREATE INDEX IDX__BPE_BPESUBSTITUICAO ON BPE ("BPESUBSTITUICAO_ID")';
exception when table_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'ALTER TABLE BPE ADD CONSTRAINT BPE_BOLETO FOREIGN KEY (BOLETO_ID) REFERENCES BOLETO (BOLETO_ID) ENABLE';
exception when object_exists then null;
end;