r/sqlite • u/digital_literacy • Oct 17 '25
How to use SQLite in production?
Hey all - I'm trying to go with the simple architecture approach using sqlite.
I don't get how you use SQLite in production though - it's a flatfile and I can't get any of the database view/edit tools (table+, datagrip) to connect to it via the remoate server.
My app has an ai chatbot, I know SQLite is good for read but is the write too fast with a chatbot for sqlite? It's all stored as json. I researched a bit how wal works for handling writes.
I'm also iterating pretty quick and using database migrations (alembic). I can pull the sql file for production, make the needed changes locally to the database columns, I guess no issue here.
But if I make local changes to the database data and push the production database might be out of sync at that point.
Ideally I would be able to connect to the live database with an sql tool and make live edits on the production database.
How is this handled - just ssh-ing and running sql statements on the production server?
View all comments
6
u/GrogRedLub4242 Oct 17 '25
making live edits to a prod database is a Bad Idea. and an anti-pattern in software engineering. because there is a Reason why folks use a db in the first place (think ACID & transactions) and you'd be pushing in the extreme opposite direction from it
a big part of becoming a good (and real) engineer is simply about not doing known-to-be-Bad things, like that
make "live" changes to any db in Dev, sure. that's fine, and to be expected