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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRPTMC_QUERYSCHEME') CREATE INDEX IDX_HRPTMC_QUERYSCHEME ON T_HRPTMC_QUERYSCHEME ( FRPTMANAGEID );


 EXEC P_ALTERPK 'PK_HRPTMC_QUERYSCHEME_L', 'T_HRPTMC_QUERYSCHEME_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRPTMC_SHARESCHEME', 'T_HRPTMC_SHARESCHEME', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRPTMC_SHARESCHEME') CREATE INDEX IDX_HRPTMC_SHARESCHEME ON T_HRPTMC_SHARESCHEME ( FSCHEMEID );


 EXEC P_ALTERPK 'PK_HRPRMC_SCHEMESHAREUSERS', 'T_HRPRMC_SCHEMESHAREUSERS', 'FPKID', '1';

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



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