I had an old version of Darktable, which I uninstalled along with all its related databases. After installing the latest version, I keep encountering the following message when trying to open the app:
The database schema must be updated for appdata/local/darktable/library.db.
For large databases, this process may take a long time. Would you like to continue or exit now to create a backup?
When I choose to update the database, nothing happens—the app simply closes. This keeps repeating, and I can’t even open Darktable.
Has anyone experienced this issue? How can I fix it?
Uninstalling does not remove either the database or configuration. If you really want to get rid of them, you’ll have to do that manually.
However, darktable should be able to migrate them. Please do as Mica suggested, and share the log. Your operating system, your old and new darktable version could also be important. (‘latest’ could be the 5.0.1 release, a weekly build, a nightly build, your own build from whatever the current state of the master branch is…)
If the suggested fixes don’t resolve your problem it might help to know the OS you are using. I am on Windows and I update every week to the latest version of DT5.1 without problems. Windows asks to uninstall DT and then it installs the new version. Sometimes it will ask to update the database when I start the new version and I allow this and the process is very quick in my case.
I had this same issue on Windows 10, trying to migrate from 4.6.1. I didn’t think about starting from the command line. The only fix was to move ~/appdata/local/darktable out of the way - so no migration done. Is there no log created when run from windows start? It’s not in the old darktable directory, or my home directory.
Make sure antivirus hasn’t locked the file if there is no .lock files left over from darktable. If that doesn’t work either, the db might be corrupt. You can use sqlite3 to test the database.
I did open the file with the Firefox sqlite plugin and it looked ok, no complaints. Is there some internal db lock?
My antivirus is Windows Defender, so no issue there.