I was having some issue with some file renaming yesterday, and after trying to fix everything, I’m now in the following situation, where I have this warning:
At a guess the renaming has managed to create two entries in the files table of your org-roam.db (I’m guessing this because org-roam–rename-file-advice calls expand-file-name) and hence when it comes to trying to build the refs table it has two options of where to try and put it.
I can think of a number of ways to fix this (if you check C-h v org-roam-db-location you can find the database, its just sqlite so you can go edit it and resolve the issue) but probably the fastest and easiest fix is to do the following:
Backup your org-roam.db just in case
M-x org-roam-db-clear
M-x org-roam-db-build-cache (or just restart emacs)
Wait a little while as it processes your org files
Boom, new DB has been created fresh.
From what I can tell nothing of value is stored in the org-roam.db, everything is in your org files, so you can wipe out the database and it’ll rebuild it, its just hints to make it run nice and smooth.