#35854: Order of "choices" on CharField randomly changing forcing new migrations
despite no changes.
-----------------------------------+--------------------------------------
Reporter: WoosterInitiative | Owner: (none)
Type: Bug | Status: closed
Component: Migrations | Version: 5.1
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Natalia Bidart):
* keywords: CharField =>
* resolution: => duplicate
* status: new => closed
Comment:
Hello WoosterInitiative, thank you for taking the time to create this
report.
This ticket is, strictly speaking, a duplicate of #26609, which was closed
as `wontfix` for the reasons detailed in the ticket:26609#comment:3. But
I'm happy to say that you can also workaround this issue by defining a
callable for your choices (see #24561 and
[https://docs.djangoproject.com/en/5.1/releases/5.0/#more-options-for-
declaring-field-choices release notes]), and this will avoid having
migrations being generated because the order of the choices changed.
--
Ticket URL: <https://code.djangoproject.com/ticket/35854#comment:1>
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/01070192b06b5c3b-58535739-a583-4880-a90b-44ccbf201ce1-000000%40eu-central-1.amazonses.com.