code: func upgradeDBPaths() error {
  	// Prior to version 0.2.0, the databases were in the "db" directory and
  	// their names were suffixed by "testnet" and "regtest" for their
  	// respective networks.  Check for the old database and update it to the
  	// new path introduced with version 0.2.0 accordingly.
  	oldDbRoot := filepath.Join(oldBtcdHomeDir(), "db")
  	upgradeDBPathNet(filepath.Join(oldDbRoot, "btcd.db"), "mainnet")
  	upgradeDBPathNet(filepath.Join(oldDbRoot, "btcd_testnet.db"), "testnet")
  	upgradeDBPathNet(filepath.Join(oldDbRoot, "btcd_regtest.db"), "regtest")
  
  	// Remove the old db directory.
  	return os.RemoveAll(oldDbRoot)
  }
docs: // upgradeDBPaths moves the databases from their locations prior to btcd
  // version 0.2.0 to their new locations.