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

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

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


 EXEC P_ALTERPK 'PK_FMM_AUTHORIZEMODEL_L', 'T_FMM_AUTHORIZEMODEL_L', 'FPKID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_MODEL_ENTITY', 'T_FMM_MODEL_ENTITY', 'FENTRYID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_AUTHENGINETYPE', 'T_FMM_AUTHENGINETYPE', 'FID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_AUTHENGINETYPE_L', 'T_FMM_AUTHENGINETYPE_L', 'FPKID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_ENGINE_ENTITY', 'T_FMM_ENGINE_ENTITY', 'FENTRYID', '1';

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

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



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