From: <sc...@hy...> - 2009-03-16 06:08:40
|
Author: scottmf Date: 2009-03-15 23:08:33 -0700 (Sun, 15 Mar 2009) New Revision: 12774 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=12774 Modified: branches/HQ_4_1/installer/data/db-upgrade.xml branches/HQ_4_1/sql/appdef/Cprop.hbm.xml Log: [HHQ-2923] changed the unique key's leading edge to APPDEF_ID, KEYID to fix the mysql deadlock issue. Modified: branches/HQ_4_1/installer/data/db-upgrade.xml =================================================================== --- branches/HQ_4_1/installer/data/db-upgrade.xml 2009-03-16 06:07:03 UTC (rev 12773) +++ branches/HQ_4_1/installer/data/db-upgrade.xml 2009-03-16 06:08:33 UTC (rev 12774) @@ -9664,6 +9664,35 @@ </schema-directSQL> </schemaSpec> + <schemaSpec version="3.138"> + <schema-directSQL> + <statement targetDB="mysql"> + alter table EAM_CPROP drop foreign key FKE5D04798CCF47F9F + </statement> + <statement targetDB="mysql"> + drop index KEYID on EAM_CPROP + </statement> + <statement targetDB="mysql"> + alter table EAM_CPROP add constraint FKE5D04798CCF47F9F foreign key (KEYID) REFERENCES EAM_CPROP_KEY (ID) + </statement> + <statement targetDB="mysql"> + create unique index APPDEF_ID on EAM_CPROP(APPDEF_ID, KEYID, VALUE_IDX) + </statement> + <statement targetDB="oracle"> + alter table EAM_CPROP drop unique (KEYID, APPDEF_ID, VALUE_IDX) + </statement> + <statement targetDB="oracle"> + alter table EAM_CPROP add unique (APPDEF_ID, KEYID, VALUE_IDX) + </statement> + <statement targetDB="postgresql"> + alter table EAM_CPROP drop constraint eam_cprop_keyid_key + </statement> + <statement targetDB="postgresql"> + alter table EAM_CPROP add unique (APPDEF_ID, KEYID, VALUE_IDX) + </statement> + </schema-directSQL> + </schemaSpec> + </dbupgrade> </target> </project> Modified: branches/HQ_4_1/sql/appdef/Cprop.hbm.xml =================================================================== --- branches/HQ_4_1/sql/appdef/Cprop.hbm.xml 2009-03-16 06:07:03 UTC (rev 12773) +++ branches/HQ_4_1/sql/appdef/Cprop.hbm.xml 2009-03-16 06:08:33 UTC (rev 12774) @@ -15,12 +15,12 @@ </version> <properties name="cpropId" unique="true"> + <property name="appdefId" type="integer"> + <column name="APPDEF_ID" not-null="true"/> + </property> <many-to-one name="key" class="CpropKey"> <column name="KEYID" not-null="true"/> </many-to-one> - <property name="appdefId" type="integer"> - <column name="APPDEF_ID" not-null="true"/> - </property> <property name="valueIdx" type="integer"> <column name="VALUE_IDX" not-null="true"/> </property> |