Problem fixed thanks to Kovid Goyal.
Here is the deal with the
Corrupted database error. It was caused by an old
metax database view of unknown origin.
Calibre 9 removes three long unused columns from the "books" table (isbn, lccn and flags). If something previously created a SQLite view called
metax in your metadata.db (likely a third party plugin that somehow needed an extended meta view) then SQLite refuses to drop those columns because
metax still references them.
To fix: Click
[NO] in the error dialog to avoid creating an empty library, then open your
metadata.db with a SQLite tool and run:
Quote:
|
DROP VIEW IF EXISTS metax;
|
Then save, reopen Calibre, and the upgrade should complete normally.