/**Begin D:\work\PDM\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/

 EXEC P_ALTERPK 'PK_HRCS_WORKINGPLANLEGAL', 'T_HRCS_WORKINGPLANLEGAL', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_WORKINGPLANPLACE', 'T_HRCS_WORKINGPLANPLACE', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_WORKINGPLANTEAM', 'T_HRCS_WORKINGPLANTEAM', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_WORKINGPLANSCOPE', 'T_HRCS_WORKINGPLANSCOPE', 'FPKID', '1';

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



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