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-87c2c4800839master
parent
97a68f9ed2
commit
5e4f5844e7
|
@ -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;
|
Loading…
Reference in New Issue