Currently, list shows all migrations in date-hash-name order. Before the introduction of deferred migrations, that meant it was the order they had been applied, and the reverse order (from the bottom up) of what will rollback. Now (correctly) rollback will rollback the most recently applied migration, which can be a deferred one that is some distance up the list. This is surprising.
~Two~Three possible fixes:
require --run-deferred for rollbacks as well
if about to rollback a deferred rollback, prompt for a confirmation
Change list to list in applied order, rather than name order.
Currently,
list
shows all migrations in date-hash-name order. Before the introduction of deferred migrations, that meant it was the order they had been applied, and the reverse order (from the bottom up) of what willrollback
. Now (correctly) rollback will rollback the most recently applied migration, which can be a deferred one that is some distance up the list. This is surprising.~Two~Three possible fixes:
--run-deferred
for rollbacks as well