SQLite corruption is usually your fault
The SQLite team keeps a public list of every way you can break their database. Turns out most corruption comes from ignoring fsync or writing to the file yourself.
Read the note 1 min read
From the notebook
1 note on this topic.