Re: [Django] #35176: Renaming a field and other attributes result in deleting and recreating a new column. (was: Renaming a field and its verbose name result in deleting and recreating a new column in django 4.2)

2 vues
Accéder directement au premier message non lu

Django

non lue,
8 févr. 2024, 06:53:068 févr.
à django-...@googlegroups.com
#35176: Renaming a field and other attributes result in deleting and recreating a
new column.
----------------------------------+--------------------------------------
Reporter: Corentin Bettiol | Owner: nobody
Type: New feature | Status: closed
Component: Migrations | Version: 4.2
Severity: Normal | Resolution: wontfix
Keywords: rename, renaming | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* type: Bug => New feature
* resolution: => wontfix
* summary:
Renaming a field and its verbose name result in deleting and
recreating a new column in django 4.2
=>
Renaming a field and other attributes result in deleting and
recreating a new column.

Comment:

Migrations are unable to detect that field is renamed after any other
attribute changes. You need to do this in two steps:
- rename a field (generate migrations).
- change a verbose name (generate migrations, this is a no-op).
--
Ticket URL: <https://code.djangoproject.com/ticket/35176#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message