#24543: Add checks / command options for "migrations not applied" and 
"migrations
needed"
-----------------------------+--------------------------------------
     Reporter:  blueyed      |                    Owner:
         Type:  New feature  |                   Status:  new
    Component:  Migrations   |                  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 blueyed):

 > As for me, I simply execute `migrate` as part of a deployment script.

 You are right, this is good enough and what you want to do in general.

 But what I've really meant to ask for is getting the "current migration(s)
 being applied", in case you need to rollback during deployment.

 This could be achieved manually by querying the django_migrations table
 etc, but then not that easy to handle in case of a rollback.  It might be
 useful to have a way to ask the migrations system for the current ID of
 applied migrations (`
 SELECT MAX(id) from django_migrations`) and then provide a new feature to
 rollback any later migrations (by some more complicated SQL).


 As for the 2nd wish, the `--exit` option to `makemigrations` is what I was
 looking for (added in deb6076).
 Thanks!

--
Ticket URL: <https://code.djangoproject.com/ticket/24543#comment:4>
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/065.2413b3cd70a57e3f565b2fbd84e31ef2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to