summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-11-04 07:25:35 -0500
committerTim Graham <timograham@gmail.com>2014-11-04 07:27:53 -0500
commitd373e223bdb0722b1d7ff9c470f3bf562815507c (patch)
tree6e874e4a599049db76440239e99afe844260126b
parentc3b101fae5fb1218ebad78b3439a4b5ae1f05142 (diff)
[1.7.x] Added a warning about nonexistent FK constraints when unmigrated apps depend on migrated ones.
Thanks NotSqrt for the report; refs #23741. Backport of f0ff452451 from master
-rwxr-xr-xdocs/topics/migrations.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/topics/migrations.txt b/docs/topics/migrations.txt
index c43b256eff..be8dd6e659 100755
--- a/docs/topics/migrations.txt
+++ b/docs/topics/migrations.txt
@@ -213,8 +213,13 @@ will be.
Be aware, however, that unmigrated apps cannot depend on migrated apps, by the
very nature of not having migrations. This means that it is not generally
-possible to have an unmigrated app have a ForeignKey or ManyToManyField to
-a migrated app; some cases may work, but it will eventually fail.
+possible to have an unmigrated app have a ``ForeignKey`` or ``ManyToManyField``
+to a migrated app; some cases may work, but it will eventually fail.
+
+.. warning::
+
+ Even if things appear to work with unmigrated apps depending on migrated
+ apps, Django may not generate all the necessary foreign key constraints!
This is particularly apparent if you use swappable models (e.g.
``AUTH_USER_MODEL``), as every app that uses swappable models will need