/**Begin D:\PDM_UPGRADE\PDM1\HRPTMC_constraint.sql **/
 EXEC P_ALTERPK 'PK_HRPTMC_VIRTUALENTITY', 'T_HRPTMC_VIRTUALENTITY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HRPTMC_VIRTUALFIELD', 'T_HRPTMC_VIRTUALFIELD', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRPTMC_VIRTUALFIELD') CREATE INDEX IDX_HRPTMC_VIRTUALFIELD ON T_HRPTMC_VIRTUALFIELD ( FFIELDNUMBER );


 EXEC P_ALTERPK 'PK_HRPTMC_VFIELDGROUP', 'T_HRPTMC_VFIELDGROUP', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HRPTMC_VIRTUALENTITY_L', 'T_HRPTMC_VIRTUALENTITY_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRPTMC_VIRTUALFIELD_L', 'T_HRPTMC_VIRTUALFIELD_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRPTMC_VIRTUALFIELD_L') CREATE INDEX IDX_HRPTMC_VIRTUALFIELD_L ON T_HRPTMC_VIRTUALFIELD_L ( FENTRYID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_HRPTMC_VFIELDGROUP_L', 'T_HRPTMC_VFIELDGROUP_L', 'FPKID', '1';

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



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