Opened 5 years ago
Closed 4 years ago
#31516 closed Cleanup/optimization (fixed)
Change automatic migration naming from date-based to operation-based
Reported by: | Adam Johnson | Owned by: | Manav Agarwal |
---|---|---|---|
Component: | Migrations | Version: | 3.0 |
Severity: | Normal | Keywords: | |
Cc: | Carles Pina Estany | 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
Following #31468 and a discussion on django-developers with broad consensus, change the way migrations are automatically named from date-based to operation-based. That is never name migrations based upon the current date (auto_YYYYMMDD
) and instead always based on the operations they contain, rather than the current behaviour which uses either style.
Change History (16)
comment:1 by , 5 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 5 years ago
Cc: | added |
---|
comment:3 by , 4 years ago
Owner: | changed from | to
---|---|
Patch needs improvement: | set |
comment:4 by , 4 years ago
Just a vague idea but I personally feel would be good to implement. In order to avoid ellipsis in the name refer this comment. We may add a suffix like "_+26" (in case there are 26 other operations, we may get this number from fragments
).
This is just a vague representation but I feel if we may implement something like this, it would be a better option. Need some suggestions.
I would be happy to submit a PR for this.
comment:5 by , 4 years ago
Owner: | changed from | to
---|
comment:6 by , 4 years ago
Patch needs improvement: | unset |
---|
comment:8 by , 4 years ago
Patch needs improvement: | unset |
---|
comment:9 by , 4 years ago
Patch needs improvement: | set |
---|
comment:10 by , 4 years ago
Patch needs improvement: | unset |
---|
comment:11 by , 4 years ago
Patch needs improvement: | set |
---|
comment:12 by , 4 years ago
Patch needs improvement: | unset |
---|
comment:14 by , 4 years ago
Triage Stage: | Accepted → Ready for checkin |
---|---|
Type: | New feature → Cleanup/optimization |
It looks like a luke-warmish OK on the list, so I guess we should push it forward to review. Thanks Adam.