Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在向南迁移我们的 heroku 生产数据库之前,我想在一个分叉的数据库上尝试迁移,看看它们是否成功完成。这对heroku有可能吗?
迁移的标准命令是:
heroku run python manage.py migrate [app]
但manage.py当然会直接指向我们的生产数据库。我将如何让它迁移分叉的数据库?
manage.py
您需要的是一个暂存环境,它只是另一个(免费)heroku 应用程序,链接到您的分叉或复制数据库。在那里,您可以推送新代码并进行迁移,就像使用生产环境一样。
这是heroku关于如何做到这一点的解释。