Asheesh Laroia  committed 3c3f8b9

Adjust the sqlite3 alter_column method to accept ignore_constraints

Before this patch, migrations written to call alter_column() and
pass ignore_constraints=True (or =False) would work on
database backends like MySQL, but fail on sqlite3 with a TyepError:

TypeError: alter_column() got an unexpected keyword argument 'ignore_constraints'

This patch fixes that.

  • Participants
  • Parent commits 6edd38f

Comments (0)

Files changed (1)

File south/db/

         #    sql += " UNIQUE"
         return sql
-    def alter_column(self, table_name, name, field, explicit_name=True):
+    def alter_column(self, table_name, name, field, explicit_name=True, ignore_constraints=False):
-        Changes a column's SQL definition
+        Changes a column's SQL definition.
+        Note that this sqlite3 implementation ignores the ignore_constraints argument.
+        The argument is accepted for API compatibility with the generic
+        DatabaseOperations.alter_column() method.
         # Remake the table correctly
         self._remake_table(table_name, altered={