by earthboundkid · 2y ago · 0 comments
1. I should make blog engine using flat files. That way I can diff the plain text.
2. But flat files are hard to read/write structured data from, so I should use SQLite instead.
3. But SQLite is hard to diff. GOTO 1.
There's no reason you can't do the same but including the content too.
That way you're always committing a text friendly version of the database rather than the database binary encoding. And your diffs will work great.
diff <(sqlite3 db 'select text from posts where id = 1') <(sqlite3 db 'select text from posts where id = 2')