/**Begin D:\PDM_UPGRADE\PDM1\kd_1.5.252_soehrr_constraint_240609.sql **/
 EXEC P_ALTERPK 'PK_SOEHRR_DISUNITPLANRC', 'T_SOEHRR_DISUNITPLANRC', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SOEHRR_DISUNITPLANRC') CREATE INDEX IDX_SOEHRR_DISUNITPLANRC ON T_SOEHRR_DISUNITPLANRC ( FBASEDATAID );


EXEC p_DropIdx 'IDX_SOEHRR_REPULSERECORD_L', 'T_SOEHRR_REPULSERECORD_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SOEHRR_REPULSERECORD_L') CREATE INDEX IDX_SOEHRR_REPULSERECORD_L ON T_SOEHRR_REPULSERECORD_L ( FID ,FLOCALEID );

EXEC p_DropIdx 'IDX_SOEHRR_COLLECTTASK_L', 'T_SOEHRR_COLLECTTASK_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SOEHRR_COLLECTTASK_L') CREATE INDEX IDX_SOEHRR_COLLECTTASK_L ON T_SOEHRR_COLLECTTASK_L ( FID ,FLOCALEID );

EXEC p_DropIdx 'IDX_SOEHRR_REPORT_L', 'T_SOEHRR_REPORT_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SOEHRR_REPORT_L') CREATE INDEX IDX_SOEHRR_REPORT_L ON T_SOEHRR_REPORT_L ( FID ,FLOCALEID );

 EXEC P_ALTERPK 'PK_SOEHRR_SUMREPORT_L', 'T_SOEHRR_SUMREPORT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SOEHRR_SUMREPORGS', 'T_SOEHRR_SUMREPORGS', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SOEHRR_SUMREPORGS') CREATE INDEX IDX_SOEHRR_SUMREPORGS ON T_SOEHRR_SUMREPORGS ( FID ,FBASEDATAID );


 EXEC P_ALTERPK 'PK_SOEHRR_SUMFILLREPORT', 'T_SOEHRR_SUMFILLREPORT', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SOEHRR_SUMREPORT', 'T_SOEHRR_SUMREPORT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SOEHRR_SUMREPORT') CREATE INDEX IDX_SOEHRR_SUMREPORT ON T_SOEHRR_SUMREPORT ( FCOLLECTTASK );



/**End D:\PDM_UPGRADE\PDM1\kd_1.5.252_soehrr_constraint_240609.sql **/
