Skip to content

Commit

Permalink
[HHQ-3357] fix up issues with EAM_RESOURCE_EDGE constraints/indexes, …
Browse files Browse the repository at this point in the history
…EAM_RESOURCE constraints and HQ_AVAIL_DATA_RLE availval column and remove the index on endtime since it exists elsewhere
  • Loading branch information
scottmf committed Sep 9, 2009
1 parent 456e4b8 commit 9606f6e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
23 changes: 19 additions & 4 deletions installer/data/db-upgrade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10016,7 +10016,7 @@ has already been defined.
<schemaSpec version="3.155">
<schema-directSQL>
<statement targetDB="mysql" fail="false">
ALTER TABLE EAM_RESOURCE DROP FOREIGN KEY EAM_RESOURCE_ibfk_1
ALTER TABLE EAM_RESOURCE DROP FOREIGN KEY eam_resource_ibfk_1
</statement>
<statement targetDB="mysql" fail="false">
ALTER TABLE EAM_RESOURCE ADD CONSTRAINT FK7AC0E15C9E309B2B
Expand All @@ -10033,18 +10033,30 @@ has already been defined.
<statement targetDB="mysql" fail="false">
ALTER TABLE EAM_RESOURCE_EDGE DROP INDEX FKD1FCB6C0CCC27921
</statement>
<!-- the following stmts are ensuring that the unique key is (FROM_ID,TO_ID,REL_ID,DISTANCE) -->
<statement targetDB="mysql" fail="false">
ALTER TABLE EAM_RESOURCE_EDGE DROP FOREIGN KEY EAM_RESOURCE_EDGE_ibfk_1
ALTER TABLE EAM_RESOURCE_EDGE DROP FOREIGN KEY eam_resource_edge_ibfk_1
</statement>
<statement targetDB="mysql">
ALTER TABLE EAM_RESOURCE_EDGE DROP FOREIGN KEY FKD1FCB6C0A2BF2D92
</statement>
<statement targetDB="mysql" fail="false">
ALTER TABLE EAM_RESOURCE_EDGE DROP KEY FROM_ID
</statement>
<statement targetDB="mysql">
ALTER TABLE EAM_RESOURCE_EDGE ADD CONSTRAINT FROM_ID UNIQUE(FROM_ID,TO_ID,REL_ID,DISTANCE)
</statement>
<statement targetDB="mysql">
ALTER TABLE EAM_RESOURCE_EDGE ADD CONSTRAINT FKD1FCB6C0A2BF2D92
FOREIGN KEY (FROM_ID) REFERENCES EAM_RESOURCE (ID) ON DELETE CASCADE
</statement>
<!-- end -->
<statement targetDB="mysql" fail="false">
ALTER TABLE EAM_RESOURCE_EDGE MODIFY COLUMN VERSION_COL bigint(20) NOT NULL DEFAULT 0
ALTER TABLE EAM_RESOURCE_EDGE ADD CONSTRAINT FKD1FCB6C0A2BF2D92
FOREIGN KEY (FROM_ID) REFERENCES EAM_RESOURCE (ID) ON DELETE CASCADE
</statement>
<statement targetDB="mysql" fail="false">
ALTER TABLE EAM_RESOURCE_EDGE ADD CONSTRAINT FROM_ID UNIQUE(FROM_ID,TO_ID,REL_ID,DISTANCE)
ALTER TABLE EAM_RESOURCE_EDGE MODIFY COLUMN VERSION_COL bigint(20) NOT NULL DEFAULT 0
</statement>
<statement targetDB="mysql" fail="false">
ALTER TABLE EAM_RESOURCE_EDGE DROP INDEX EAM_RESOURCE_EDGE_FROM_ID_KEY
Expand All @@ -10057,6 +10069,9 @@ has already been defined.
entry points of deployments-->
<schemaSpec version="3.157">
<schema-directSQL>
<statement targetDB="mysql" fail="false">
ALTER TABLE HQ_AVAIL_DATA_RLE DROP INDEX AVAIL_RLE_ENDTIME_IDX
</statement>
<statement targetDB="mysql" fail="false">
ALTER TABLE HQ_AVAIL_DATA_RLE DROP FOREIGN KEY FK6E8F9E9CAE18683B
</statement>
Expand Down
2 changes: 1 addition & 1 deletion sql/common-dbsetup-typemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<map db="pointbase" type="FLOAT(15)" />
<map db="postgres" type="FLOAT8" />
<map db="java" type="FLOAT" />
<map db="mysql" type="FLOAT(15)" />
<map db="mysql" type="DOUBLE" />
</typemap>
<typemap type="BOOLEAN">
<map db="postgres" type="BOOLEAN" />
Expand Down

0 comments on commit 9606f6e

Please sign in to comment.