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

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FPM_BODYSYS') CREATE INDEX IDX_FPM_BODYSYS ON T_FPM_CONTROLWAYCONFIG ( FBODYSYSID );


EXEC P_ALTERPK 'PK_T_FPM_CONTROL_STRATEGY', 'T_FPM_CONTROL_STRATEGY', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_T_FPM_APPLY_REPORTORG', 'T_FPM_APPLY_REPORTORG', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_T_FPM_EXECUTETIME', 'T_FPM_EXECUTETIME', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FPM_EXECUTETIME') CREATE INDEX IDX_FPM_EXECUTETIME ON T_FPM_EXECUTETIME ( FBODYSYSID );


EXEC P_ALTERPK 'PK_T_FPM_EXECUTETIME_L', 'T_FPM_EXECUTETIME_L', 'FPKID', '1';

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


EXEC P_ALTERPK 'PK_T_FPM_CONTROLWAYCONFIG_L', 'T_FPM_CONTROLWAYCONFIG_L', 'FPKID', '1';

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


EXEC P_ALTERPK 'PK_T_FPM_ACLDEDUCTIONBILL', 'T_FPM_ACLDEDUCTIONBILL', 'FPKID', '1';

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


EXEC P_ALTERPK 'PK_T_FPM_PREEMPTEDBILL', 'T_FPM_PREEMPTEDBILL', 'FPKID', '1';

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


EXEC P_ALTERPK 'PK_T_FPM_PREEMPTEDTIME', 'T_FPM_PREEMPTEDTIME', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_T_FPM_ACLDEDUCTION', 'T_FPM_ACLDEDUCTION', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_T_FPM_CONTROLREPORTTYPE', 'T_FPM_CONTROLREPORTTYPE', 'FPKID', '1';

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



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