/**Begin D:\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HRCS_ECONTEMPLATETYPE', 'T_HRCS_ECONTEMPLATETYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_ECONTEMPLATETYPE_L', 'T_HRCS_ECONTEMPLATETYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_ECONTEMPLATE', 'T_HRCS_ECONTEMPLATE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_ECONTEMPLATE_L', 'T_HRCS_ECONTEMPLATE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_SIGNRECORD', 'T_HRCS_SIGNRECORD', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_SIGNRECOED') CREATE INDEX IDX_HRCS_SIGNRECOED ON T_HRCS_SIGNRECORD ( FECONNUMBER );


 EXEC P_ALTERPK 'PK_HRCS_KEYWORDMAPPING', 'T_HRCS_KEYWORDMAPPING', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_KEYWORDMAPPING') CREATE INDEX IDX_HRCS_KEYWORDMAPPING ON T_HRCS_KEYWORDMAPPING ( FCONTEMPID ,FFORMNUMBER );


 EXEC P_ALTERPK 'PK_HRCS_PERAUTHRECORD', 'T_HRCS_PERAUTHRECORD', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_ECTEMPLATETYPEMAP', 'T_HRCS_ECTEMPLATETYPEMAP', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_ECONTNOTIFY', 'T_HRCS_ECONTNOTIFY', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_ECONTNOTIFY') CREATE INDEX IDX_HRCS_ECONTNOTIFY ON T_HRCS_ECONTNOTIFY ( FCLOUD ,FAPPNUM );


 EXEC P_ALTERPK 'PK_HRCS_SKIPAUTH', 'T_HRCS_SKIPAUTH', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_SKIPAUTH') CREATE INDEX IDX_HRCS_SKIPAUTH ON T_HRCS_SKIPAUTH ( FBUSINESSID ,FCLOUD ,FAPPNUM );



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