Commits

and...@69d324d9-c39d-4fdc-8679-7745eae9e2c8  committed 0cc9e39

Detect changes to M2M fields correctly.

  • Participants
  • Parent commits 4d862c2

Comments (0)

Files changed (1)

File south/management/commands/startmigration.py

             
             if hasattr(field, "m2m_db_table"):
                 # See if anything has ACTUALLY changed
-                pass
+                if old_triple[1] != new_triple[1]:
+                    print " ! Detected change to the target model of M2M field '%s.%s'. South can't handle this; leaving this change out." % (mkey, field_name)
+                continue
             
             print " ~ Changed field '%s.%s'." % (mkey, field_name)