/**Begin D:\pdm\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HRCS_ESSYNCSCHEMECONF', 'T_HRCS_ESSYNCSCHEMECONF', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_ESSYNCSCHEMECONF_1') CREATE INDEX IDX_HRCS_ESSYNCSCHEMECONF_1 ON T_HRCS_ESSYNCSCHEMECONF ( FQUERYENTITYID );


 EXEC P_ALTERPK 'PK_HRCS_ESSCHEMEDETAIL', 'T_HRCS_ESSCHEMEDETAIL', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_ESSYNCSCHEMECONF_L', 'T_HRCS_ESSYNCSCHEMECONF_L', 'FPKID,FID,FLOCALEID,FNAME,FDESCRIPTION', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_ESSYNCRECORD', 'T_HRCS_ESSYNCRECORD', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_ESSYNCRECORD_1') CREATE INDEX IDX_HRCS_ESSYNCRECORD_1 ON T_HRCS_ESSYNCRECORD ( FESSCHEMEID );


 EXEC P_ALTERPK 'PK_HRCS_ESCONFIGWHITEBILL', 'T_HRCS_ESCONFIGWHITEBILL', 'FID', '1';

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

 EXEC P_ALTERPK 'PK_HRCS_ESCONFIG', 'T_HRCS_ESCONFIG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_HRCS_ESCONFIG_1') CREATE INDEX IDX_T_HRCS_ESCONFIG_1 ON T_HRCS_ESCONFIG ( FIP );
/**End D:\pdm\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
