/**Begin D:\utils\PDM_UPGRADE\PDM_UPGRADE\PDM1\HRPTMC_constraint.sql **/
EXEC P_ALTERPK 'PK_HRPTC_USERPERM', 'T_HRPTC_USERPERM', 'FUSERPERMID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRPTC_USERPERM_FUSERID') CREATE INDEX IDX_HRPTC_USERPERM_FUSERID ON T_HRPTC_USERPERM ( FUSERID );


EXEC P_ALTERPK 'PK_HRPTC_USERPERM_L', 'T_HRPTC_USERPERM_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRPTC_USERPERM_L') CREATE INDEX IDX_HRPTC_USERPERM_L ON T_HRPTC_USERPERM_L ( FLOCALEID ,FUSERPERMID );


EXEC P_ALTERPK 'PK_HRPTC_FIELDDISABLEENTRY', 'T_HRPTC_FIELDDISABLEENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRPTC_FIELDDISABLEENTRY') CREATE INDEX IDX_HRPTC_FIELDDISABLEENTRY ON T_HRPTC_FIELDDISABLEENTRY ( FUSERPERMID );


EXEC P_ALTERPK 'PK_HRPTC_RPTPERMDATA', 'T_HRPTC_RPTPERMDATA', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRPTC_RPTPERMDATA') CREATE INDEX IDX_HRPTC_RPTPERMDATA ON T_HRPTC_RPTPERMDATA ( FUSERPERMID );


EXEC P_ALTERPK 'PK_HRPTC_SELECTREPORTENTRY', 'T_HRPTC_SELECTREPORTENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRPTC_SELECTREPORTENTRY') CREATE INDEX IDX_HRPTC_SELECTREPORTENTRY ON T_HRPTC_SELECTREPORTENTRY ( FUSERPERMID );


EXEC P_ALTERPK 'PK_HRPTC_SELECTREPORTGROUP', 'T_HRPTC_SELECTREPORTGROUP', 'FDETAILID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRPTC_SELECTREPORTGROUP') CREATE INDEX IDX_HRPTC_SELECTREPORTGROUP ON T_HRPTC_SELECTREPORTGROUP ( FENTRYID );



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