summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Apolloner <florian@apolloner.eu>2014-08-10 13:31:06 +0200
committerFlorian Apolloner <florian@apolloner.eu>2014-08-10 13:31:06 +0200
commit61d783f3d7c9d4c7a0ac05f7fbbaba78e5cef5aa (patch)
tree2bdbddad5a91b13fa29e83d1e2f5bb9b4211f9e3
parentdc462a8ed55edacd71709f3db6fd225296871927 (diff)
Made sqlite's remove_field behave like the base backend.
-rw-r--r--django/db/backends/sqlite3/schema.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/db/backends/sqlite3/schema.py b/django/db/backends/sqlite3/schema.py
index 85aaaa1af4..4ea5ecf0a0 100644
--- a/django/db/backends/sqlite3/schema.py
+++ b/django/db/backends/sqlite3/schema.py
@@ -172,6 +172,9 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
# For explicit "through" M2M fields, do nothing
# For everything else, remake.
else:
+ # It might not actually have a column behind it
+ if field.db_parameters(connection=self.connection)['type'] is None:
+ return
self._remake_table(model, delete_fields=[field])
def _alter_field(self, model, old_field, new_field, old_type, new_type, old_db_params, new_db_params, strict=False):