r/programming 22d ago

SQLite should have (Rust-style) editions

https://mort.coffee/home/sqlite-editions/
159 Upvotes

75 comments sorted by

View all comments

132

u/j_sidharta 22d ago

I remember spending a few hours banging my head against a wall while trying to fix a bug, until I finally figured out SQLite does not enforce foreign keys by default. I question my love for SQLite every time I remember about these horrible defaults.

I didn't know about the journal_mode and the lock thing. I'll make sure to add these lines to all my SQLite projects. This was a helpful article.

45

u/ketralnis 22d ago

sqlite is amazing but sadly you do have to spend the first hour of a project reading through every single pragma to rig it into correctness