1

我在 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.

重新运行makemigrationsmigrate简单地返回相同的错误语句。我究竟做错了什么?

4

1 回答 1

0

我不太确定那个,但是在你运行迁移之后,文件创建了:

0002 _entry_content_placeholder.py

如您所见,第二个迁移文件。如果它适合您,您可以尝试删除/重命名迁移文件夹/文件并再次运行 makemigrations。前段时间我遇到了同样的错误,如果我没记错的话,那就成功了。

对不起英语不好

于 2014-11-20T09:38:12.550 回答