code: func (m *Migrator) migrateLogStore() error {
  	op := "Migrating log store"
  	m.sendProgress(op, 0, 1)
  
  	first, err := m.mdbStore.FirstIndex()
  	if err != nil {
  		return err
  	}
  	if first == 0 {
  		return errFirstIndexZero
  	}
  
  	last, err := m.mdbStore.LastIndex()
  	if err != nil {
  		return err
  	}
  	if last == 0 {
  		return errLastIndexZero
  	}
  	total := int(last - first)
  
  	current := 0
  	for i := first; i <= last; i++ {
  		log := &raft.Log{}
  		if err := m.mdbStore.GetLog(i, log); err != nil {
  			return err
  		}
  		if err := m.boltStore.StoreLog(log); err != nil {
  			return err
  		}
  		current++
  		m.sendProgress(op, current, total)
  	}
  	return nil
  }
docs: // migrateLogStore is like migrateStableStore, but iterates over
  // all of our Raft logs and copies them into the new BoltStore.