Commits

Andrew Godwin committed 1eba1b3

Fix #464: Don't try and alter types of columns with no type.

  • Participants
  • Parent commits 11f3034

Comments (0)

Files changed (1)

south/db/generic.py

         }
 
         # SQLs is a list of (SQL, values) pairs.
-        sqls = [(self.alter_string_set_type % params, [])]
-
+        sqls = []
+        
+        # Only alter the column if it has a type (Geometry ones sometimes don't)
+        if params["type"] is not None:
+            sqls.append((self.alter_string_set_type % params, []))
+        
         # Next, nullity
         if field.null:
             sqls.append((self.alter_string_set_null % params, []))