Python 如何在heroku中应用特定的django数据库迁移?
我上传了我修改过的代码,在模型中做了一些修改。当我运行Python 如何在heroku中应用特定的django数据库迁移?,python,django,heroku,migration,django-migrations,Python,Django,Heroku,Migration,Django Migrations,我上传了我修改过的代码,在模型中做了一些修改。当我运行heroku运行python manage.py migrate app来应用数据库迁移时,它给了我一个错误 CommandError:检测到冲突迁移(应用程序中的0004_auto_20150819_08270008_auto_20150813_1444)。 要修复它们,请运行“python manage.py makemigrations--merge” 因此,当我运行heroku运行python manage.py makemigrat
heroku运行python manage.py migrate app来应用数据库迁移时,它给了我一个错误
CommandError:检测到冲突迁移(应用程序中的0004_auto_20150819_08270008_auto_20150813_1444)。
要修复它们,请运行“python manage.py makemigrations--merge”
因此,当我运行heroku运行python manage.py makemigrations--merge
时,它给了我输出:
创建了新的合并迁移/app/app/migrations/0009\u merge.py
现在,如何将此迁移应用于我的数据库?也许吧
heroku run python manage.py migrate
或者看看它将应用于什么:
heroku run python manage.py showmigrations
您应该首先在本地计算机上创建此迁移,而不是在Heroku上创建。我的意思是python manage.py makemigrations--merge