【发布时间】:2019-08-28 19:11:58
【问题描述】:
我正在尝试在 python 3.7 中的 django 2.2.4 中进行迁移。 首先我尝试做makemigations:
python3 manage.py makemigrations
我明白了:
Migrations for 'main':
main/migrations/0001_initial.py
- Create model TutorialCategory
- Create model TutorialSeries
- Create model Tutorial
然后我尝试第二步:
python3 manage.py migrate
我明白了:
Operations to perform:
Apply all migrations: admin, auth, contenttypes, main, sessions
Running migrations:
No migrations to apply.
即使应该进行迁移。
我尝试删除我的迁移文件夹,然后重新制作它(其中包含空的 __init__.py 文件),但它仍然不起作用。
(注意:我一直在学习教程:Linking models with Foreign Keys - Django Web Development with Python p.9 by sentdex)
【问题讨论】:
-
这一切都在本地运行吗?例如,不在 Heroku 上?
-
是的,它在本地运行。
标签: python django makemigrations