我在Heroku上使用Django 1.7.1和Python 3在Cedar堆栈上运行了一个Django-CMS项目。
我可以使用:heroku run python manage.py makemigrations创建一个很好的迁移,它返回:
Migrations for 'zinnia':
0002_entry_content_placeholder.py:
- Add field content_placeholder to entry但是,通过:heroku run python manage.py migrate运行迁移返回:
Operations to perform:
Synchronize unmigrated apps: mptt, tagging, djangocms_admin_style, localflavor, django_comments, robots, ckeditor, sekizai, compressor, cmsplugin_plaintext, storages
Apply all migrations: admin, cms, zinnia, sessions, contenttypes, sites, auth, djangocms_link, djangocms_file, djangocms_picture, djangocms_text_ckeditor, menus
Synchronizing apps without migrations:
Creating tables...
Installing custom SQL...
Installing indexes...
Running migrations:
No migrations to apply.
Your models have changes that are not yet reflected in a migration,
and so won't be applied.
Run 'manage.py makemigrations' to make new migrations, and then re-run
'manage.py migrate' to apply them.重新运行makemigrations和migrate只返回相同的错误语句。我做错了什么?
发布于 2014-11-20 09:38:12
我对此不太确定,但是在运行了迁移之后,文件创建了:
0002_entry_content_placeholder.py
正如您注意到的,是第二个迁移文件。如果这是您的选项,您可以尝试删除/重命名迁移文件夹/文件,然后再次运行makemigrations。不久前我也犯了同样的错误,如果我没记错的话,那就成功了。
抱歉英语不太好
https://stackoverflow.com/questions/26965062
复制相似问题