/**Begin D:\utils\PDM_UPGRADE\PDM_UPGRADE\PDM1\HRPTMC_constraint.sql **/
EXEC P_ALTERPK 'PK_HRPTC_REPORTCENTER', 'T_HRPTC_REPORTCENTER', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRPTC_CENTER_GROUPID') CREATE INDEX IDX_HRPTC_CENTER_GROUPID ON T_HRPTC_REPORTCENTER ( FREPORTGROUPID );


EXEC P_ALTERPK 'PK_HRPTC_REPORTCENTER_L', 'T_HRPTC_REPORTCENTER_L', 'FPKID', '1';

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


EXEC P_ALTERPK 'PK_HRPTC_REPORTGROUP', 'T_HRPTC_REPORTGROUP', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRPTC_GROUP_FLONGNUMBER') CREATE INDEX IDX_HRPTC_GROUP_FLONGNUMBER ON T_HRPTC_REPORTGROUP ( FLONGNUMBER );

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRPTC_GROUP_FPARENTID') CREATE INDEX IDX_HRPTC_GROUP_FPARENTID ON T_HRPTC_REPORTGROUP ( FPARENTID );


EXEC P_ALTERPK 'PK_HRPTC_REPORTGROUP_L', 'T_HRPTC_REPORTGROUP_L', 'FPKID', '1';

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



/**End D:\utils\PDM_UPGRADE\PDM_UPGRADE\PDM1\HRPTMC_constraint.sql **/
