#24099 closed Cleanup/optimization (fixed)
Remove ContentType.name
| Reported by: | Claude Paroz | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.contenttypes | Version: | dev |
| Severity: | Normal | Keywords: | |
| 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
Work has been done in #16803 to deprecate the denormalized hardcoded ContentType.name field, but the final deprecation was depending on a schema migration framework. I think it's now time to finish that task and finally remove the field.
Change History (8)
comment:1 by , 11 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 11 years ago
See the proposed PR: https://github.com/django/django/pull/3858
Passing the name field when creating a ContentType is still allowed, but the field is simply discarded and a warning is emitted. I think that it's important to allow for example for existing fixtures to still be used. Hopefully this deprecation strategy will be enough, usage will tell.
comment:3 by , 11 years ago
| Has patch: | set |
|---|---|
| Triage Stage: | Accepted → Ready for checkin |
comment:4 by , 11 years ago
| Triage Stage: | Ready for checkin → Accepted |
|---|
The migration is not reversible because the name field is not nullable. I don't think this is acceptable. Does someone know about a workaround? Should we add an intermediary migration?
comment:5 by , 11 years ago
| Patch needs improvement: | set |
|---|
comment:6 by , 11 years ago
| Patch needs improvement: | unset |
|---|---|
| Triage Stage: | Accepted → Ready for checkin |
comment:7 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Do you think this needs a deprecation cycle in some way?