正如标题所说,我似乎无法让迁移正常工作。
这个应用程序最初是1.6以下的,所以我知道迁移最初不会在那里,实际上,如果我运行python manage.py migrate
,我会得到:
Operations to perform:
Synchronize unmigrated apps: myapp
Apply all migrations: admin, contenttypes, auth, sessions
Synchronizing apps without migrations:
Creating tables...
Installing custom SQL...
Installing indexes...
Running migrations:
No migrations to apply.
如果我在myapp
中更改了任何模型,它仍然显示未迁移,这与预期不谋而合。
但是如果我运行python manage.py makemigrations myapp
,我会得到:
No changes detected in app 'myapp'
我运行命令的内容或方式似乎并不重要,它永远不会检测到应用程序是否发生了更改,也不会向应用程序添加任何迁移文件。
有没有办法强迫一个应用程序迁移,本质上是说“这是我的工作基础”或其他什么?还是我错过了什么?
我的数据库是PostgreSQL数据库,如果有帮助的话。
https://stackoverflow.com/questions/24912173
复制相似问题