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

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ADJUST_REPORTORG') CREATE INDEX IDX_ADJUST_REPORTORG ON T_FPM_REPORTPLAN_ADJUST ( FREPORTORGID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ADJUST_REPORTPERIOD') CREATE INDEX IDX_ADJUST_REPORTPERIOD ON T_FPM_REPORTPLAN_ADJUST ( FREPORTPERIODID );


EXEC P_ALTERPK 'PK_T_FPM_CHGREPORTDATAMAIN', 'T_FPM_CHGREPORTDATAMAIN', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_T_FPM_CHGREPORTDATADETAIL', 'T_FPM_CHGREPORTDATADETAIL', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_T_FPM_ADJUSTAMTINFO', 'T_FPM_ADJUSTAMTINFO', 'FENTRYID', '1';

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



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