#26841: Avoid remaking tables for altering index_together and unique_together in
sqlite3
----------------------------------------------+--------------------
     Reporter:  akki                          |      Owner:  nobody
         Type:  Cleanup/optimization          |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  master
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 Currently the `alter_index_together`/`alter_unique_together` methods of
 `SchemaEditor` drop and remake the whole table just to add/drop indexes
 but this doesn't seem to be required. The default methods defined in
 `base.schema` seem to do the job perfectly (in fact, more efficiently) to
 me.

 I might be missing something here but no tests fail when I remove these
 methods from `sqlite3.schema`, so we are at least missing the tests to
 show why we might need to drop and re-create the whole table just to add
 an index (or a `unique_together` constraint).

--
Ticket URL: <https://code.djangoproject.com/ticket/26841>
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.97a26119a02239269bfa12d36a8cb3c1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to