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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_DYNAMSGDEALTRACE_FMESSAGEID') CREATE INDEX IDX_HRCS_DYNAMSGDEALTRACE_FMESSAGEID ON T_HRCS_DYNAMSGDEALTRACE ( FMESSAGEID );


 EXEC P_ALTERPK 'PK_HRCS_DYNAMSGDEALSCHEME', 'T_HRCS_DYNAMSGDEALSCHEME', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_DYNAMSGDEALCAL', 'T_HRCS_DYNAMSGDEALCAL', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_DYNAMSGDEALPARAMS', 'T_HRCS_DYNAMSGDEALPARAMS', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_DYNAMSGDEALPARAMS') CREATE INDEX IDX_HRCS_DYNAMSGDEALPARAMS ON T_HRCS_DYNAMSGDEALPARAMS ( FENTRYID ,FBASEDATAID );
 

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