Hello!

Today if you just need to unmigrate the *n* migrations before the last one 
you would
typically run `migrate <app> --list` and then `migrate <app> 
<migration_name>` where 
`migration_name` is the migration you want to roll back to.

To reduce the steps of this procedure i think it would be nice to introduce
a syntax similar to how commits in for example git works. I.e `git show 
HEAD^`
for the previous commit and `git show HEAD~2` for the one before that.
It would also be good to support the `git show <commit_id>(^+)|(~\d)` 
variant
of this to be able to choose the origin.

For this to work good for the normal case, there need to be a magic word
that maps to the latest migration available and/or the latest applied 
migration.

I can clearly see a use case for this as I can imagine that the most common
operation besides applying all unmigrated migrations is to roll back *n* 
migrations.

Does this sounds like a good idea?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/9ef49cce-5eb6-4a52-85e1-fd507b28991a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to