Is it safe to run migrations on SQLite in production?

Is it still standard advice to warn developers about running migrations against SQLite in a production environment?

The docs state (emphasis mine):

This process generally works well, but it can be slow and occasionally buggy. It is not recommended that you run and migrate SQLite in a production environment unless you are very aware of the risks and its limitations; the support Django ships with is designed to allow developers to use SQLite on their local machines to develop less complex Django projects without the need for a full database.

This advice was added to the documentation in 2013 via commit 06103c8. Looking through the last five years of migration related tickets on Trac, I find only one accepted bug specific to SQLite (and at least as many for PostgreSQL). I wonder if this advice is outdated. What are the community’s thoughts about removing the warning?

Sincerely,
- a big fan of running SQLite in production

I’m also a fan of using SQLite in production - under the appropriate circumstances. (I’ve got a few posts here where I have described when/where I have used it.)

Note the complete sentence:

(Emphasis mine)

Personally, I think the warning is still valid. You can create problems for yourself if you extend the database usage beyond what SQLite can comfortably handle. (e.g. Don’t try to rely upon SQLite if you’ve got multiple Celery and Channels workers doing lots of background DB updates.)

I like the idea that we remind people that SQLite is not a universal replacement or substitute for a real database engine. If you know and understand what the risks and limitations are, great. If you don’t - don’t rely upon it in production because you may get bit.

2 Likes