#31731: Dead code in the sequence_reset_sql for postgres and oracle
-------------------------------------+-------------------------------------
     Reporter:  axil                 |                    Owner:  Ravindar
         Type:                       |  Sharma
  Cleanup/optimization               |                   Status:  closed
    Component:  Database layer       |                  Version:  3.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  sql sequence reset   |             Triage Stage:  Ready for
  postgres oracle                    |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"18d4eac7fce6dfab6149ec7aba72f3c765b5722c" 18d4eac7]:
 {{{
 #!CommitTicketReference repository=""
 revision="18d4eac7fce6dfab6149ec7aba72f3c765b5722c"
 Fixed #31731 -- Removed unreachable code for resetting sequences of auto-
 created m2m tables in sequence_reset_sql().

 Unreachable because f.remote_field.through is truthy for all m2m
 fields.

 Resetting sequences of auto-created m2m tables in sequence_reset_sql()
 is also unnecessary:
  - in sqlsequencereset since c39ec6dccb389fbb4047e44f5247e18bb76ae598
    because auto-created tables are included in model_list,
  - in loaddata because there is no it need to reset sequences for
    models not loaded directly.
  - in create_default_site() because it doesn't have m2m fields.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31731#comment:8>
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/062.0982381065414cad5f9213fba5835453%40djangoproject.com.

Reply via email to