code: func (db *schemaUpdater) updateSchema1to2() {
  	t := db.newReadWriteTransaction()
  	defer t.close()
  
  	var sk []byte
  	var dk []byte
  	for _, folderStr := range db.ListFolders() {
  		folder := []byte(folderStr)
  		db.withHave(folder, protocol.LocalDeviceID[:], nil, true, func(f FileIntf) bool {
  			sk = db.keyer.GenerateSequenceKey(sk, folder, f.SequenceNo())
  			dk = db.keyer.GenerateDeviceFileKey(dk, folder, protocol.LocalDeviceID[:], []byte(f.FileName()))
  			t.Put(sk, dk)
  			t.checkFlush()
  			return true
  		})
  	}
  }
docs: // updateSchema1to2 introduces a sequenceKey->deviceKey bucket for local items
  // to allow iteration in sequence order (simplifies sending indexes).