This project is archived and is in readonly mode.
db:migrate:down should default to the current migration
Reported by David Chelimsky | October 10th, 2008 @ 06:18 PM
$ rake -T | grep down
rake db:migrate:down # Runs the "down" for a given migration VERSION.
$ rake db:migrate:down
rake aborted!
VERSION is required
Most of the time I use this, it's while I'm developing a migration and I want to run the down for the one I'm working on. I think that if you don't set a VERSION that it should just figure out the current version and use that.
Similarly, db:migrate:up should default to the one greater than the one you're working on, though that could be trickier because it would have to deduce this from the file system.
Comments and changes to this ticket
-
Pratik January 11th, 2009 @ 02:55 PM
- Milestone cleared.
- Assigned user set to Pratik
-
Pratik January 18th, 2009 @ 04:11 AM
- State changed from new to wontfix
What michael said. db:migrate:rollback - rollbacks one version. It takes STEP env var argument too, in case you want to rollback more than 1 versions. And to migrate up, could just use the good ol' db:migrate :)
There's also db:migrate:redo which rollbacks a version and applies it again.
Thanks.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>