Django Südkreisabhängigkeit

Ich habe eine App (nennen wir sie MyApp) in einem Django 1.5-Projekt. MyApp definiert ein benutzerdefiniertes Benutzermodell (MyUser). Das Projekt verwendet eine andere App (AnotherApp), die auf MyUser verweist. MyApp verweist auf Felder in AnotherApp.

Auf meinem Entwicklungs-Laptop hat alles einwandfrei funktioniert. Ich versuche, mein Projekt auf einem Server bereitzustellen. Wenn ich zum Migrationsschritt komme, schlägt MyApp aufgrund einer Abhängigkeit von AnotherApp fehl, und AnotherApp schlägt aufgrund einer Abhängigkeit von MyApp fehl (ich habe versucht, die Apps unabhängig zu migrieren). Beide scheitern bei ihrer ersten Migration (0001)

Running migrations for myapp:
 - Migrating forwards to 0017_auto__blah_blah.
 > myapp:0001_initial
FATAL ERROR - The following SQL query failed: ALTER TABLE "myapp_mymodel_othermodel" ADD CONSTRAINT "othermodel_id_refs_id_ae052c6d" FOREIGN KEY ("othermodel_id") REFERENCES "anotherapp_othermodel" ("id") DEFERRABLE INITIALLY DEFERRED;
The error was: relation "anotherapp_othermodel" does not exist

Error in migration: myapp:0001_initial
DatabaseError: relation "anotherapp_othermodel" does not exist


Running migrations for anotherapp:
 - Migrating forwards to 0008_blah_blah.
 > anotherapp:0001_initial
FATAL ERROR - The following SQL query failed: ALTER TABLE "anotherapp_othermodel" ADD CONSTRAINT "creator_id_refs_id_cff6fecf" FOREIGN KEY ("creator_id") REFERENCES "myuser" ("id") DEFERRABLE INITIALLY DEFERRED;
The error was: relation "myuser" does not exist

Error in migration: anotherapp:0001_initial
DatabaseError: relation "myuser" does not exist

Irgendwelche Ideen?

Antworten auf die Frage(1)

Ihre Antwort auf die Frage