1. Andrew Godwin
  2. south

Commits

and...@69d324d9-c39d-4fdc-8679-7745eae9e2c8  committed 2fc72aa

Fix ordering on type/null

  • Participants
  • Parent commits e1eec77
  • Branches default

Comments (0)

Files changed (1)

File management/commands/startmigration.py

View file
  • Ignore whitespace
             fields = []
             for f in model._meta.local_fields:
                 # We use a list of tuples to get nice ordering
+                type, type_param = genericify_type(f.db_type())
                 field = [
                     ("name", f.column),
+                    ("type", type),
+                    ("type_param", type_param),
                     ("null", f.null),
                 ]
-                type, type_param = genericify_type(f.db_type())
-                field.append(("type", type))
-                field.append(("type_param", type_param))
                 if f.primary_key:
                     field.append(('primary', True))
                 if f.unique: