* keywords: Migration Sqlite Docker => Migration Sqlite
* has_patch: 1 => 0
* severity: Normal => Release blocker
* needs_tests: 1 => 0
Comment:
Thanks! It should be enough to avoid this optimization on indexes fields:
{{{#!diff
diff --git a/django/db/backends/sqlite3/schema.py
b/django/db/backends/sqlite3/schema.py
index 55fdf5fbfe..6c106ae868 100644
--- a/django/db/backends/sqlite3/schema.py
+++ b/django/db/backends/sqlite3/schema.py
@@ -408,10 +408,11 @@ class
DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
# For explicit "through" M2M fields, do nothing
elif (
self.connection.features.can_alter_table_drop_column
- # Primary keys, unique fields, and foreign keys are not
- # supported in ALTER TABLE DROP COLUMN.
+ # Primary keys, unique fields, indexed fields, and foreign
keys are
+ # not supported in ALTER TABLE DROP COLUMN.
and not field.primary_key
and not field.unique
+ and not field.db_index
and not (field.remote_field and field.db_constraint)
):
super().remove_field(model, field)
}}}
According to
[https://www.sqlite.org/lang_altertable.html#alter_table_drop_column
SQLite docs]:
> ''Possible reasons why the DROP COLUMN command can fail include':'
> ...
> * ''The column is indexed.''****
Regression in 3702819227fd0cdd9b581cd99e11d1561d51cbeb.
--
Ticket URL: <https://code.djangoproject.com/ticket/33899#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.