Django use two databases for seamless updates

两盒软妹~` 提交于 2019-12-12 03:07:18

问题


I have a database (PostgreSQL), which I need to update from time to time (every 6 hours). I don't want partial updates to appear on the output, so my idea is:

We use two databases, let them be named prod and update. prod is all the time on duty, while update is being updated every 6 hours and then it should pass changes (or change places) to (with) prod.

How can I implement such behaviour in Django? I know, that there are migrations and db_to_write, db_to_read variants, but they stay not clear to me from the tutorial.

来源:https://stackoverflow.com/questions/28652343/django-use-two-databases-for-seamless-updates

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!