Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't allow really long migration names

  • Loading branch information...
commit 1232acb88411f9c4327971c8edff1d191eb0f170 1 parent e46e15e
@andrewgodwin andrewgodwin authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 django/db/migrations/autodetector.py
View
5 django/db/migrations/autodetector.py
@@ -349,7 +349,10 @@ def arrange_for_graph(self, changes, graph):
if i == 0 and not app_leaf:
new_name = "0001_initial"
else:
- new_name = "%04i_%s" % (next_number, self.suggest_name(migration.operations))
+ new_name = "%04i_%s" % (
+ next_number,
+ self.suggest_name(migration.operations)[:100],
+ )
name_map[(app_label, migration.name)] = (app_label, new_name)
next_number += 1
migration.name = new_name
Please sign in to comment.
Something went wrong with that request. Please try again.