简体   繁体   中英

Do I need to migrate to PostgreSQL from SQLite for Heroku deployment?

Pretty much just as the title describes. It doesn't exactly say on the offical website and i've seen conflicting info in other guides. I have another post where I'm running into difficulties and thought this could be related but better off as it's own question.

You don't "need" to migrate to PostgreSQL, but it is highly recommended.

SQLite is recommended for lightweight development use, and the way it implements its locking strategy can cause many issues for your production app when there are many concurrent db connections. There are also many "gotchas" and differences in how django/sqlite handles migrations and validation/integrity compared to other databases (sqlite is not strict, which can be dangerous), so it is recommended to have the same DB in dev as in production.

Django docs: https://docs.djangoproject.com/en/3.0/ref/databases/

SQLite simple locking mechanism: https://stackoverflow.com/a/6919386/3345051

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM