code: func (db *schemaUpdater) updateSchema2to3() {
  	t := db.newReadWriteTransaction()
  	defer t.close()
  
  	var nk []byte
  	var dk []byte
  	for _, folderStr := range db.ListFolders() {
  		folder := []byte(folderStr)
  		db.withGlobal(folder, nil, true, func(f FileIntf) bool {
  			name := []byte(f.FileName())
  			dk = db.keyer.GenerateDeviceFileKey(dk, folder, protocol.LocalDeviceID[:], name)
  			var v protocol.Vector
  			haveFile, ok := t.getFileTrunc(dk, true)
  			if ok {
  				v = haveFile.FileVersion()
  			}
  			if !need(f, ok, v) {
  				return true
  			}
  			nk = t.keyer.GenerateNeedFileKey(nk, folder, []byte(f.FileName()))
  			t.Put(nk, nil)
  			t.checkFlush()
  			return true
  		})
  	}
  }
docs: // updateSchema2to3 introduces a needKey->nil bucket for locally needed files.