Commits

Andrew Godwin  committed fb2c64e

Remove duplicate unique constraint code. Fixes #1053.

  • Participants
  • Parent commits 3e25c74

Comments (0)

Files changed (1)

File south/db/generic.py

                         'table': self.quote_name(table_name),
                         'constraint': self.quote_name(constraint),
                     })
-                    
-            # Drop or add UNIQUE constraint
-            unique_constraint = list(self._constraints_affecting_columns(table_name, [name], "UNIQUE"))
-            if field.unique and not unique_constraint:
-                self.create_unique(table_name, [name])
-            elif not field.unique and unique_constraint:
-                self.delete_unique(table_name, [name])
         
             # Drop all foreign key constraints
             try:
         # First, change the type
         params = {
             "column": self.quote_name(name),
-            "type": self._db_type_for_alter_column(field),            
+            "type": self._db_type_for_alter_column(field),
             "table_name": table_name
         }