summaryrefslogtreecommitdiff
path: root/django/db
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-07-15 08:48:29 -0400
committerTim Graham <timograham@gmail.com>2014-07-15 08:51:16 -0400
commitfe5f29eb1db795257d4095df0e1547c17daadade (patch)
tree20405a33a22720758d1cc7d7bac566f526eb329d /django/db
parentf2011e21a2d803ab6328852c3af4a4bf6701b11d (diff)
[1.7.x] Fixed #23008 -- Fixed typo causing bad migration dependencies.
Thanks semenov for the report and Florian for investigation. Backport of 9a2ab62977 from master
Diffstat (limited to 'django/db')
-rw-r--r--django/db/migrations/autodetector.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/migrations/autodetector.py b/django/db/migrations/autodetector.py
index c3a3424cd1..6f7f446c84 100644
--- a/django/db/migrations/autodetector.py
+++ b/django/db/migrations/autodetector.py
@@ -254,13 +254,13 @@ class MigrationAutodetector(object):
# If we can't find the other app, we add a first/last dependency,
# but only if we've already been through once and checked everything
if chop_mode:
- # If the app already exists, we add __last__, as we don't know which
+ # If the app already exists, we add __latest__, as we don't know which
# migration contains the target field.
# If it's not yet migrated or has no migrations, we use __first__
if graph and not graph.root_nodes(dep[0]):
operation_dependencies.add((dep[0], "__first__"))
else:
- operation_dependencies.add((dep[0], "__last__"))
+ operation_dependencies.add((dep[0], "__latest__"))
else:
deps_satisfied = False
if deps_satisfied: