/**Begin D:\PDM_UPGRADE\PDM1\FCS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_FCS_BANKQUERYDETAIL', 'T_FCS_BANKQUERYDETAIL', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FCS_BQD_ACT') CREATE INDEX IDX_FCS_BQD_ACT ON T_FCS_BANKQUERYDETAIL ( FACCOUNTID ,FCURRENCYID ,FLASTRUNTIME );

 EXEC P_ALTERPK 'PK_T_FCS_SAFETYINSPECT', 'T_FCS_SAFETYINSPECT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'T_FCS_SAFETYINSPECT_IDX') CREATE INDEX T_FCS_SAFETYINSPECT_IDX ON T_FCS_SAFETYINSPECT ( FBIZDATE ,FISREPORT );


 EXEC P_ALTERPK 'PK_T_FCS_SAFETYINSPECT_D', 'T_FCS_SAFETYINSPECT_D', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_FCS_SAFETYINSPECT_U', 'T_FCS_SAFETYINSPECT_U', 'FENTRYID', '1';

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


 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TIME_FCS_SUSBECTBILL') CREATE INDEX IDX_TIME_FCS_SUSBECTBILL ON T_FCS_SUSPECTBILL ( FCREATETIME );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_FCS_REPEATCTRLLOG_TYPE') CREATE INDEX IDX_T_FCS_REPEATCTRLLOG_TYPE ON T_FCS_REPEATCTRLLOG ( FCREATETIME ,FLOGTYPE );

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