根据此处的文档: https ://docs.djangoproject.com/en/1.8/topics/migrations/它说:
migrate, which is responsible for applying migrations, as well as unapplying and listing their status.
和
makemigrations, which is responsible for creating new migrations based on the changes you have made to your models.
据我了解,我先做
makemigrations
创建迁移文件,然后执行
migrate
实际应用迁移?
请注意,我刚刚开始了我的 Django 项目,并且我将我的应用程序添加到了我的“installed_apps”列表中。在那之后,我做了
python manage.py runserver
它说
You have unapplied migrations; your app may not work properly until they are applied. Run 'python manage.py migrate' to apply them.
它没有提到任何关于运行 makemigrations 的内容。