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

 EXEC P_ALTERPK 'PK_HRPTMC_VIRTENTFIELDS', 'T_HRPTMC_VIRTENTFIELDS', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HRPTMC_VIRTENTFIELDS_L', 'T_HRPTMC_VIRTENTFIELDS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRPTMC_VIRTENTITYCLASS', 'T_HRPTMC_VIRTENTITYCLASS', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HRPTMC_VIRTENTITYCLASS_L', 'T_HRPTMC_VIRTENTITYCLASS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRPTMC_VIRTUALSCENE', 'T_HRPTMC_VIRTUALSCENE', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRPTMC_VIRTUALSCENE_L', 'T_HRPTMC_VIRTUALSCENE_L', 'FPKID', '1';

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



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