/**Begin D:\PDM_UPGRADE\PDM1\FPM_constraint.sql **/
EXEC P_ALTERPK 'PK_T_FPM_EXECUTEPLAN', 'T_FPM_EXECUTEPLAN', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EXECPLAN_BODYSYS') CREATE INDEX IDX_EXECPLAN_BODYSYS ON T_FPM_EXECUTEPLAN ( FBODYSYS );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EXECPLAN_REPORTORG') CREATE INDEX IDX_EXECPLAN_REPORTORG ON T_FPM_EXECUTEPLAN ( FREPORTORG );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EXECPLAN_CURRENCYMEM') CREATE INDEX IDX_EXECPLAN_CURRENCYMEM ON T_FPM_EXECUTEPLAN ( FCURRENCYMEM );


EXEC P_ALTERPK 'PK_T_FPM_EXECUTEPLAN_BIZINFO', 'T_FPM_EXECUTEPLAN_BIZINFO', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_T_FPM_EXECUTEPLAN_E', 'T_FPM_EXECUTEPLAN_E', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FPM_EXECUTEPLAN_E') CREATE INDEX IDX_FPM_EXECUTEPLAN_E ON T_FPM_EXECUTEPLAN_E ( FENTRYID );


EXEC P_ALTERPK 'PK_T_FPM_MATCHRULE', 'T_FPM_MATCHRULE', 'FID', '1';

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


EXEC P_ALTERPK 'PK_T_FPM_MATCHRULE_RULE', 'T_FPM_MATCHRULE_RULE', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_T_FPM_MATCHRULE_L', 'T_FPM_MATCHRULE_L', 'FPKID', '1';

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



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