Opened 2 years ago
Last modified 2 years ago
#33899 closed Bug
migrations.RemoveField causes OperationalError "no such column" upon migration — at Version 1
Reported by: | cessor | Owned by: | nobody |
---|---|---|---|
Component: | Migrations | Version: | 4.1 |
Severity: | Release blocker | Keywords: | Migration Sqlite |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Description
I encountered the following error with django 4.1 in my Gitlab CI/CD Pipeline. When I bumped django versions from 4.0.7 to 4.1. my pipeline broke during the testing stage; specifically during db migrations. I have not changed any other source code.
Steps to reproduce
Minimal example attached. Run make green
to see that it works with 4.0.7, run make red
to see that it does not work with 4.1. It will build and exercise a docker container which installs all dependencies in isolation and sets up an example django app and run migrations.
Manual steps:
- Install django 4.1
- Create a new project
- Create an app
- Install app in project
- Create a model
- Add field on model
- Make migrations
- Remove field
- Make migrations
The migration should fail.
Change History (2)
by , 2 years ago
Attachment: | django-bug-33899.tgz added |
---|
comment:1 by , 2 years ago
Description: | modified (diff) |
---|
Minimal Example