diff options
| author | Tim Graham <timograham@gmail.com> | 2014-10-23 12:24:34 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-10-23 14:35:55 -0400 |
| commit | 7750fc8fa80470e4c10b3753667e04f78ebe4781 (patch) | |
| tree | 1927ad3814bcefbfaa06219c0ec7a43930ceb275 /django | |
| parent | ba6a599ce4e363cdce2d4cc439ce57436fb194fb (diff) | |
[1.7.x] Fixed #23702 -- Fixed adding an explicit id field on SQLite.
Thanks gavinwahl for the report.
Backport of 92269b7b53 from master
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/backends/sqlite3/schema.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/backends/sqlite3/schema.py b/django/db/backends/sqlite3/schema.py index 34e52f8417..7ed5449c8d 100644 --- a/django/db/backends/sqlite3/schema.py +++ b/django/db/backends/sqlite3/schema.py @@ -75,8 +75,8 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): ) # Add in any altered fields for (old_field, new_field) in alter_fields: - del body[old_field.name] - del mapping[old_field.column] + body.pop(old_field.name, None) + mapping.pop(old_field.column, None) body[new_field.name] = new_field if old_field.null and not new_field.null: case_sql = "coalesce(%(col)s, %(default)s)" % { |
