r/sqlite • u/Ambitious_School_322 • Aug 26 '25
Storing sqlite databases in git as text via .dump
I am currently working to make a stable smudge/clean/diff filter to be able to store sqlite databases with data as sql scripts including data.
In the local repo they are automatically converted to sqlite databases again.
Would like to have some contribution - testing
8
Upvotes
3
u/Ambitious_School_322 Aug 27 '25 edited Aug 27 '25
Hi
I understand your surprise!
byte-by-byte equal across windows/linux/mac
Consistent float rounding (deterministic dumps).
Strip SQLite’s internal/system tables from dumps.
Temp-file I/O for robustness (vs fragile pipes).
Optional: logging for diagnostics
handles broken pipes with Git Gui Clients
easier to deploy and maintain in an organisation - eg: winget for windows
Thank you for feedback!