1
0
mirror of https://github.com/django/django.git synced 2025-03-14 03:10:45 +00:00

[1.7.x] Made sqlite's remove_field behave like the base backend.

Backport of 61d783f3d7c9d4c7a0ac05f7fbbaba78e5cef5aa from master.
This commit is contained in:
Florian Apolloner 2014-08-10 13:31:06 +02:00
parent ee74f9fe3b
commit cdc42ac0d6

View File

@ -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):