True, but a clean restart should do the trick as well.
What I also noticed (and this is why I suggested enabling showing all file extensions is this:

The red marked file is the actual library.db file that darktable will re-create if it doesn’t exist.
The green marked file is just library (no file extension) and telling from the size, it’s probably identical to the library.db-pre-3.8.0.
The same pattern repeats itself with the data.db.