/**Begin D:\PDM_UPGRADE\PDM1\FMM_constraint.sql **/
 EXEC P_ALTERPK 'PK_FMM_MBPRATIO', 'T_FMM_MBPRATIO', 'FID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_MBPRATIO_L', 'T_FMM_MBPRATIO_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_MBPRIOL_FID') CREATE INDEX IDX_FMM_MBPRIOL_FID ON T_FMM_MBPRATIO_L ( FID ,FLOCALEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_MBPRIOL_FNAME') CREATE INDEX IDX_FMM_MBPRIOL_FNAME ON T_FMM_MBPRATIO_L ( FNAME );


 EXEC P_ALTERPK 'PK_FMM_MBPSCHEMA', 'T_FMM_MBPSCHEMA', 'FID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_MBPSCHEMA_L', 'T_FMM_MBPSCHEMA_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_MBPSMAL_FID') CREATE INDEX IDX_FMM_MBPSMAL_FID ON T_FMM_MBPSCHEMA_L ( FID ,FLOCALEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_MBPSMAL_FNAME') CREATE INDEX IDX_FMM_MBPSMAL_FNAME ON T_FMM_MBPSCHEMA_L ( FNAME );


 EXEC P_ALTERPK 'PK_FMM_MBPSCHENTRY', 'T_FMM_MBPSCHENTRY', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_MBPSRY_FSEQ') CREATE INDEX IDX_FMM_MBPSRY_FSEQ ON T_FMM_MBPSCHENTRY ( FSEQ );



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