/**Begin D:\PDM_UPGRADE\PDM1\FMM_constraint.sql **/
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MFTBOM_FMATERIAL') CREATE INDEX IDX_PDM_MFTBOM_FMATERIAL ON T_PDM_MFTBOM ( FMATERIALID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MFTBOMENTRY_M1') CREATE INDEX IDX_PDM_MFTBOMENTRY_M1 ON T_PDM_MFTBOMENTRY ( FMATERIALID );

 EXEC P_ALTERPK 'PK_FMM_MODEL_SIGN', 'T_FMM_MODEL_SIGN', 'FID', '1';

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

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


 EXEC P_ALTERPK 'PK_FMM_MODEL_SIGN_L', 'T_FMM_MODEL_SIGN_L', 'FPKID', '1';

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

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



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