/**Begin C:\Users\rd_jin_gu\Documents\work\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HRCS_TASKCONFIGSERVICE', 'T_HRCS_TASKCONFIGSERVICE', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_TASKCONFIGEXCL', 'T_HRCS_TASKCONFIGEXCL', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_HISCONFIGFIELD', 'T_HRCS_HISCONFIGFIELD', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_TASKCONFIG_L', 'T_HRCS_TASKCONFIG_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_TASKCONFIG_L') CREATE INDEX IDX_HRCS_TASKCONFIG_L ON T_HRCS_TASKCONFIG_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_HRCS_ENTITYDEPENDENT', 'T_HRCS_ENTITYDEPENDENT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_ENTITYDEPENDENT') CREATE INDEX IDX_HRCS_ENTITYDEPENDENT ON T_HRCS_ENTITYDEPENDENT ( FNUMBER );


 EXEC P_ALTERPK 'PK_HRCS_EDENTITY', 'T_HRCS_EDENTITY', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_EDENTITY') CREATE INDEX IDX_HRCS_EDENTITY ON T_HRCS_EDENTITY ( FEDID );


 EXEC P_ALTERPK 'PK_HRCS_EDENTITYREL', 'T_HRCS_EDENTITYREL', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_EDENTITYREL') CREATE INDEX IDX_HRCS_EDENTITYREL ON T_HRCS_EDENTITYREL ( FEDID );


 EXEC P_ALTERPK 'PK_HRCS_EDENTITYRELENTRY', 'T_HRCS_EDENTITYRELENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_ENTITYDEPENDENT_L', 'T_HRCS_ENTITYDEPENDENT_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_ENTITYDEPENDENT_L') CREATE INDEX IDX_HRCS_ENTITYDEPENDENT_L ON T_HRCS_ENTITYDEPENDENT_L ( FID ,FLOCALEID );



/**End C:\Users\rd_jin_gu\Documents\work\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
