/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BOS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_INT_WORKINGHOURS', 'T_INT_WORKINGHOURS', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_INT_WORKINGTIME', 'T_INT_WORKINGTIME', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_INT_WORKINGHOURSENTRY', 'T_INT_WORKINGHOURSENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_INT_WHE_FID') CREATE INDEX IDX_INT_WHE_FID ON T_INT_WORKINGHOURSENTRY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_T_INT_WORKINGPLAN', 'T_INT_WORKINGPLAN', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_INT_WORKINGPLANHOLIDAY', 'T_INT_WORKINGPLANHOLIDAY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_INT_WORKINGTIMEENTRY', 'T_INT_WORKINGTIMEENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_INT_WORKINGPLANHOURS', 'T_INT_WORKINGPLANHOURS', 'FENTRYID', '1';

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



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BOS_constraint.sql **/
