#33899: migrations.RemoveField causes OperationalError "no such column" upon
migration
-------------------------------------+-------------------------------------
Reporter: cessor | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 4.1
Severity: Normal | Resolution:
Keywords: Migration Sqlite | Triage Stage: Accepted
Docker |
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by fizaashraf37):
* has_patch: 0 => 1
* needs_tests: 0 => 1
* easy: 0 => 1
* stage: Unreviewed => Accepted
Comment:
The issue is valid. I have written the regression test of the exact test
case. And found the first bad commit as below:
{{{
3702819227fd0cdd9b581cd99e11d1561d51cbeb is the first bad commit
commit 3702819227fd0cdd9b581cd99e11d1561d51cbeb
Author: Mariusz Felisiak <[email protected]>
Date: Fri Feb 11 22:21:58 2022 +0100
Refs #32502 -- Avoided table rebuild when removing fields on SQLite
3.35.5+.
ALTER TABLE ... DROP COLUMN was introduced in SQLite 3.35+ however
a data corruption issue was fixed in SQLite 3.35.5.
django/db/backends/sqlite3/features.py | 2 ++
django/db/backends/sqlite3/schema.py | 10 ++++++++++
tests/schema/tests.py | 18 ++++++++++++++++++
3 files changed, 30 insertions(+)
bisect found first bad commit
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33899#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018272df2a32-7cc47545-f4dd-44d4-84cd-96705fd81987-000000%40eu-central-1.amazonses.com.