[Django] #35373: db_index=True on a Generated Column generates failing migrations

5 views
Skip to first unread message

Django

unread,
Apr 14, 2024, 12:50:08 AM4/14/24
to django-...@googlegroups.com
#35373: db_index=True on a Generated Column generates failing migrations
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
dickermoshe |
Type: Bug | Status: new
Component: Database | Version: 5.0
layer (models, ORM) |
Severity: Normal | Keywords: migrations,db
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
A migration where I added an index to a generated column resulted in a
migrations that fails with

{{{
django.db.utils.OperationalError: cannot INSERT into generated column
"effectivePrice"
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35373>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Reply all
Reply to author
Forward
0 new messages