/**Begin D:\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HRCS_RELATEENTITY', 'T_HRCS_RELATEENTITY', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_RELATEENTITY') CREATE INDEX IDX_HRCS_RELATEENTITY ON T_HRCS_RELATEENTITY ( FCONTEMPID ,FMAINENTITY );


 EXEC P_ALTERPK 'PK_HRCS_RELATEENTITYENTRY', 'T_HRCS_RELATEENTITYENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_ENTITYMAPENTRY', 'T_HRCS_ENTITYMAPENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_ENTITYMAPSUBENTRY', 'T_HRCS_ENTITYMAPSUBENTRY', 'FDETAILID', '1';

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



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