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

 EXEC P_ALTERPK 'PK_FMM_CRAFTSORFORE_L', 'T_FMM_CRAFTSORFORE_L', 'FPKID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_CRAFOREENTRY', 'T_FMM_CRAFOREENTRY', 'FENTRYID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_CRAFTSORFORE', 'T_FMM_CRAFTSORFORE', 'FID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_INDEPENWOKER', 'T_FMM_INDEPENWOKER', 'FID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_INDEPENWOKER_L', 'T_FMM_INDEPENWOKER_L', 'FPKID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_INDWOKERENTRY', 'T_FMM_INDWOKERENTRY', 'FENTRYID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_AUTHINFOENTRY', 'T_FMM_AUTHINFOENTRY', 'FENTRYID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_AUTHORINFORM', 'T_FMM_AUTHORINFORM', 'FID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_AUTHORINFORM_L', 'T_FMM_AUTHORINFORM_L', 'FPKID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_AUTHORSCHEMA', 'T_FMM_AUTHORSCHEMA', 'FID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_AUTHORSCHEMA_L', 'T_FMM_AUTHORSCHEMA_L', 'FPKID', '1';

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

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



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