https://docs.djangoproject.com/en/1.7/topics/migrations/でdjangoの移行について読んでいます。また、github の 1.7.x ブランチのコミットを確認したところ、この問題が解決された可能性があることがわかりました。残念ながら、移行を実行すると、まだエラーが発生します。--fake オプションでも同じエラーが発生します。
次の移行があります。
「人」アプリの移行:
user@host$ /manage.py makemigrations people
Migrations for 'people':
0001_initial.py:
- Create model Person
- Create model Committee
- Create model DepartmentGroup
- Add field department_group to person
- Create model MemberType
- Add field member_type to person
- Alter unique_together for person (1 constraint(s))
- Create model PersonCommittee
- Add field committees to committee
- Add field committee to personcommittee
- Add field member to personcommittee
- Alter unique_together for personcommittee (1 constraint(s))
- Create model Role
- Create proxy model PersonArchive
「場所」アプリの移行:
user@host$ ./manage.py makemigrations locations
Migrations for 'locations':
0001_initial.py:
- Create model Building
- Create model Institution
- Create model InstitutionAddress
- Add field institution to building
- Add field address to institutionaddress
- Add field institution to institutionaddress
- Create model Room
- Alter unique_together for room (1 constraint(s))
今、私は移行を実行します
./manage.py migrate
これは私が得るエラーです
django.db.migrations.graph.CircularDependencyError:
[('people', u'0001_initial'), ('locations', u'0001_initial'),
('people', u'0001_initial')]
完全なエラーは、http: //pastebin.com/jixK6Ve2で確認できます。
私の質問は、修正が必要な django コードにまだ何かがあるかどうかです。修正されたチケットを参照してください: https://code.djangoproject.com/ticket/22932。そうでない場合、循環依存エラーを回避するために移行を 2 つ以上のステップに分割するオプションはありますか?