/**Begin D:\PDM_UPGRADE\PDM1\FPM_constraint.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FPM_EXECUTE_REQUESTID') CREATE INDEX IDX_FPM_EXECUTE_REQUESTID ON T_FPM_EXECUTEPLAN_E ( FREQUESTID );

EXEC P_ALTERPK 'PK_T_FPM_CONTROLUPDATEINFO', 'T_FPM_CONTROLUPDATEINFO', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FPM_CONTROLUPDATEINFO') CREATE INDEX IDX_FPM_CONTROLUPDATEINFO ON T_FPM_CONTROLUPDATEINFO ( FBILLNO );

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


EXEC P_ALTERPK 'PK_T_FPM_CONTROLUPDATEDETAIL', 'T_FPM_CONTROLUPDATEDETAIL', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_T_FPM_CONTROLTRACEINFO', 'T_FPM_CONTROLTRACEINFO', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FPM_CONTROLTRACEINFO') CREATE INDEX IDX_FPM_CONTROLTRACEINFO ON T_FPM_CONTROLTRACEINFO ( FBUSINESSBILLID );



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