/**Begin D:\PDM_UPGRADE\PDM1\FMM_constraint.sql **/
 EXEC P_ALTERPK 'PK_FMM_SCHEMEENTRY', 'T_FMM_SCHEMEENTRY', 'FENTRYID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_SCHEMEENTRY_L', 'T_FMM_SCHEMEENTRY_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_SCHERYL_FENTRYID') CREATE INDEX IDX_FMM_SCHERYL_FENTRYID ON T_FMM_SCHEMEENTRY_L ( FENTRYID ,FLOCALEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_SCHERYL_FSCHEMENAME') CREATE INDEX IDX_FMM_SCHERYL_FSCHEMENAME ON T_FMM_SCHEMEENTRY_L ( FSCHEMENAME );


 EXEC P_ALTERPK 'PK_FMM_ITRELSUBENTRY', 'T_FMM_ITRELSUBENTRY', 'FDETAILID', '1';

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

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


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