/**Begin D:\PDM_UPGRADE\PDM1\HOM_constraint.sql **/
 EXEC P_ALTERPK 'PK_HOM_COLLECTGROUP', 'T_HOM_COLLECTGROUP', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HOM_COLLECTGROUP') CREATE INDEX IDX_HOM_COLLECTGROUP ON T_HOM_COLLECTGROUP ( FCOLLECTACTIVITYID );


 EXEC P_ALTERPK 'PK_HOM_COLLECTGROUPENTRY', 'T_HOM_COLLECTGROUPENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HOM_COLLECTGROUPENTRY') CREATE INDEX IDX_HOM_COLLECTGROUPENTRY ON T_HOM_COLLECTGROUPENTRY ( FID );


 EXEC P_ALTERPK 'PK_HOM_COLLECTFIELDSUB', 'T_HOM_COLLECTFIELDSUB', 'FDETAILID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HOM_COLLECTFIELDSUB') CREATE INDEX IDX_HOM_COLLECTFIELDSUB ON T_HOM_COLLECTFIELDSUB ( FENTRYID );



/**End D:\PDM_UPGRADE\PDM1\HOM_constraint.sql **/
