From 5e4f5844e74db838c627593b88ba9b42702adb0b Mon Sep 17 00:00:00 2001 From: julio Date: Wed, 6 Jun 2018 19:11:45 +0000 Subject: [PATCH] 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 --- .../migration/V20180606_1610__mantis11304.sql | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/db/migration/V20180606_1610__mantis11304.sql diff --git a/src/db/migration/V20180606_1610__mantis11304.sql b/src/db/migration/V20180606_1610__mantis11304.sql new file mode 100644 index 000000000..f25d97dc2 --- /dev/null +++ b/src/db/migration/V20180606_1610__mantis11304.sql @@ -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; \ No newline at end of file