/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\POM_constraint.sql **/
 EXEC P_ALTERPK 'PK_POM_MROTOOL', 'T_POM_MROTOOL', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_POM_MROTOOL_FORDERID') CREATE INDEX IDX_POM_MROTOOL_FORDERID ON T_POM_MROTOOL ( FORDERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_POM_MROTOOL_FORDERENTRYID') CREATE INDEX IDX_POM_MROTOOL_FORDERENTRYID ON T_POM_MROTOOL ( FORDERENTRYID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_POM_MROTOOL_FSOURCEBILLID') CREATE INDEX IDX_POM_MROTOOL_FSOURCEBILLID ON T_POM_MROTOOL ( FSOURCEBILLID );


 EXEC P_ALTERPK 'PK_POM_MROTOOLENTRY', 'T_POM_MROTOOLENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MROTOOLENTRY_FMASTERID') CREATE INDEX IDX_MROTOOLENTRY_FMASTERID ON T_POM_MROTOOLENTRY ( FMATERIELMASTERID );



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\POM_constraint.sql **/
