I couldn't find help nor hint for that in the documentation, especially
under the model field reference for GeneratedField.
I'd like to see that documented, if possible with help for workarounds
--
Ticket URL: <https://code.djangoproject.com/ticket/35061>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* type: Uncategorized => Cleanup/optimization
* resolution: => wontfix
Comment:
Thanks for this ticket, however, raised exception is clear and it contains
a hint: ''"must be removed and re-added"''. Modifying `GeneratedFields` is
not possible in most cases, and even if it's, it still has many db-
specific restrictions. This is not something that we want to support and
workaround doesn't exists. It's not worth documenting.
--
Ticket URL: <https://code.djangoproject.com/ticket/35061#comment:1>
Comment (by Simon Charette):
Not saying we should take any action or revisit supporting recreating
generated fields (making alter do an implicit remove + add) but
[https://www.depesz.com/2024/01/15/waiting-for-postgresql-17-alter-table-
command-to-change-generation-expression/ I found it interesting that
PostgreSQL was planning to add support for it in 17] through a non-
standard SQL extension.
--
Ticket URL: <https://code.djangoproject.com/ticket/35061#comment:2>