#31769: Improve default name of merge migrations
------------------------------------------------+------------------------
               Reporter:  Jon Dufresne          |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  Migrations            |        Version:  master
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 Currently, merge migrations filenames are created with a timestamp. For
 example:

 {{{
 0003_merge_20160102_0304.py
 }}}

 This name is more opaque than necessary. When one reads it, it isn't
 immediately clear which migrations were merged. One must inspect the file
 to find that information.

 Instead, I suggest the default filename should be created by combining the
 files being merged. This way, it includes the information without
 requiring one to inspect the file. This information is also useful in the
 `migrate` command's output. As it is most likely to merge two migrations
 files, this should remain a reasonable length.

 For example:

 {{{
 0003_merge_0002_conflicting_second_0002_second.py
 }}}

 If preferable, we could decide to join the names in other ways too. For
 example, separate names by `__` (two underscores) or exclude prefix
 numbers. To start, I'll go with the easiest approach unless there is
 strong preference for a different naming scheme.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31769>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.6b9629044f6cc7f89fbcbc0ec577fdd7%40djangoproject.com.

Reply via email to