aarranz committed 76dad79

Don't drop foreign keys in the MySQL delete_column method when running in dry_run mode

Comments (0)

Files changed (1)


                 fkey_name = cname
         if result:
             assert result == 1 # We should only have one result, otherwise there's Issues
-            cursor = self._get_connection().cursor()
-            drop_query = "ALTER TABLE %s DROP FOREIGN KEY %s"
-            cursor.execute(drop_query % (self.quote_name(table_name), self.quote_name(fkey_name)))
+            self.delete_foreign_key_by_keyname(table_name, fkey_name)
         super(DatabaseOperations, self).delete_column(table_name, name)