#26906: Factor out an AlterFooTogether operation from AlterUnique/IndexTogether
--------------------------------------+--------------------
     Reporter:  akki                  |      Owner:  nobody
         Type:  Cleanup/optimization  |     Status:  new
    Component:  Migrations            |    Version:  master
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+--------------------
 The reasons why I think this should be done are

 1)  When a bug is reported for any one of them (like #26180) the owner or
 reviewer has to check if the bug also exists (most of the time it does)
 for the other operation and apply the same fix for the other (see
 [https://github.com/django/django/pull/6926/ !6926]), or else the fix
 might get delayed until another ticket is opened reporting the same issue
 for the other operation.

 2) Recently I realized that a small part of `AlterIndexTogether` code is
 untested but tests exist for those lines for `AlterUniqueTogether` so
 having the same source of code for both the operations will result in
 better code coverage!

 3) More than 90% of the code for both the operations is the same so in
 honor of the DRY rule (this is maybe kinda the reason for point 1 :P).

--
Ticket URL: <https://code.djangoproject.com/ticket/26906>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/047.d35d4e3a69baf6407a16c1aa98b77c4f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to