#30597: Improve documentation on reseting an app's migrations to zero.
-------------------------------------+-------------------------------------
     Reporter:  Keryn Knight         |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Documentation        |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Keryn Knight):

 > Thanks for the report. I'm not sure how we could clarify what
 `"unapplying" migrations` means, it seems clear to me.

 You're not the target audience though. Nor am I. All the synonyms I used
 in searching are ones I might expect new/inexperienced users to be looking
 for.

 > Moreover my understanding is that it's not a common use case to unapply
 all migrations to "zero" state, so I don't think that it deserves a
 separate section in migrations topics.

 That it's uncommon is ''precisely why it should have documentation''
 beyond the brief throwaway comment* the management command has. It's built
 in and supported! Every time someone has to do so for the first time, it's
 either under guidance from someone who knows better, or it's by trial and
 error. That should not be the case, because there is **one** way to do it,
 and one way only, and it's mostly that the concept isn't even
 ''discussed'' which leaves the user out in the cold.

 It comes up relatively frequently on IRC that people get their migrations
 all in a muddle, and usually their answer is to just obliterate their
 database (sqlite usually) entirely (sometimes rightly, sometimes wrongly).
 But it's literally a solved problem from the framework's point of view:
 you can either reset to zero or your migrations and/or schema are so
 ruined that you need to start over or intervene manually.

 ^^* tbh, even South's documentation is better here, though it's almost as
 throwaway: ''Note that, if the system has already migrated past the
 specified migration, it will roll back to it instead. If you want to
 migrate all the way back, specify the special migration name zero''

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30597#comment:3>
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/067.85b72a955cae294fc9ce62c8f8ceb5d0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to