Opened 2 years ago

Last modified 2 years ago

#33899 closed Bug

migrations.RemoveField causes OperationalError "no such column" upon migration — at Initial Version

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

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 the 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.

Manual steps:

  1. Install django 4.1
  2. Create a new project
  3. Create an app
  4. Install app in project
  5. Create a model
  6. Add field on model
  7. Make migrations
  8. Remove field
  9. Make migrations

The migration should fail.

Change History (1)

by cessor, 2 years ago

Attachment: django-bug-33899.tgz added

Minimal Example

Note: See TracTickets for help on using tickets.
Back to Top