2
我有一个Django应用程序,我向南添加,执行一些迁移,并按预期在我的本地计算机上运行。然而,在将我的项目推到Heroku之后,我只有数据库错误。成功架构迁移后南无'迁移'消息
在试图处理我遇到一个数据库错误,我尝试一个测试,我删除了我的车型之一,推动了编辑的模型文件,Heroku的跑:
heroku run python manage.py schemamigration django_app test_remove_pub --auto
这似乎正常工作。我回来的消息:
Running `python manage.py schemamigration apricot_app test_remove_pub --auto` attached
to terminal... up, run.6408
- Deleted model django_app.Publication
- Deleted M2M table for journalists on django_app.Publication
- Deleted M2M table for tags on apricot_app.Publication
Created 0006_test_remove_pub.py. You can now apply this migration with: ./manage.py
migrate django_app
因此,南似乎做的一切我所料 - 它删除了我的模型和它的多对多关系,并取得了相应的迁移文件。接下来,我输入:
heroku run python manage.py migrate django_app
我回来:
Running `python manage.py migrate django_app` attached to terminal... up, run.4792
Running migrations for django_app:
- Nothing to migrate.
- Loading initial data for django_app.
Installed 0 object(s) from 0 fixture(s)
它为什么会说“没事迁移”时,明明有事情要迁移?