Repository navigation
docs(faq): how to recover a malformed SQLite database - #210
TimeToBuildBob wants to merge 2 commits into
Conversation
|
The failed run used stale APT metadata: The replacement Build run is queued on |
|
@greptileai review |
Git-Session-Id: a51c23a1-c0bb-4da7-865c-9d9ec3107471
b1e47b6 to
6e14de6
Compare
|
Merge-ready. FAQ entry for recovering a "database disk image is malformed" SQLite database ( |
|
@TimeToBuildBob review |
🤖 AI code reviewAdds a new FAQ section to src/faq.rst explaining how to recover from a 'database disk image is malformed' error. The steps instruct the user to quit ActivityWatch, back up the SQLite files, checkpoint the WAL, salvage the database with the sqlite3 .recover command (falling back to .dump), verify and restore the PRAGMA user_version, and finally swap in the recovered database. Safe to merge — no P0/P1 findingsConfidence 5/5 ✅ No findings. The diff looks correct to me on this pass. Files changed (1) — the diff as I read it
Previous review passes
Reviewed Maintainer commands
|
…t dropped Git-Session-Id: 2e1756a6-47e6-480b-9da0-363aac57d2ba
|
CI-green and mergeable — waiting only on a maintainer click. This PR is ready to merge, but the bot has pull-only access to this repo and can't self-merge — surfacing it here so it isn't lost. The monitoring loop will stop re-flagging it now that this note is posted. |
Adds a FAQ entry for "database disk image is malformed": quit ActivityWatch, back up
sqlite.dbwith its-wal/-shmfiles, rebuild withsqlite3 .recover(falling back to.dump), restorePRAGMA user_version, and swap the file in.The
user_versionstep matters..dumpdoes not carry it, so aw-server-rust releases before ActivityWatch/aw-server-rust#776 re-ran every migration on the restored file and crashed with a duplicate-column error. #776 (merged today) infers the version, but it is not in a release yet.Two caveats are written in because I hit them while checking the steps. Some
sqlite3builds (Ubuntu's 3.45.1 here) have no.recoverand fail withno such table: sqlite_dbpagewhile still creating an emptyrestored.db. And whether.recoverkeepsuser_versiondepends on the build, so the page says to check for0instead of claiming either way.Maintainers asked for this to be documented in ActivityWatch/aw-server#89.
Verified:
sphinx-buildproduces no warnings infaq.rst(the existing changelog duplicate-label warnings are unchanged).