/**Begin D:\PDM_UPGRADE\NEWPDM\HRCS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HRCS_BGTASKREGISTER', 'T_HRCS_BGTASKREGISTER', 'FID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_BGTASKREGISTER_2') CREATE INDEX IDX_HRCS_BGTASKREGISTER_2 ON T_HRCS_BGTASKREGISTER ( FBIZCLOUDID );


 EXEC P_ALTERPK 'PK_HRCS_BGTASKREGISTER_L', 'T_HRCS_BGTASKREGISTER_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_BGTASKRECORD', 'T_HRCS_BGTASKRECORD', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_BGTASKRECORD_1') CREATE INDEX IDX_HRCS_BGTASKRECORD_1 ON T_HRCS_BGTASKRECORD ( FTASKID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_BGTASKRECORD_2') CREATE INDEX IDX_HRCS_BGTASKRECORD_2 ON T_HRCS_BGTASKRECORD ( FBGTASKREGISTERID );


 EXEC P_ALTERPK 'PK_HRCS_BGTASKSESSION', 'T_HRCS_BGTASKSESSION', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_BGTASKSESSION') CREATE INDEX IDX_HRCS_BGTASKSESSION ON T_HRCS_BGTASKSESSION ( FTASKID ,FGLOBALSESSIONID );



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