This project is archived and is in readonly mode.
Patch to allow 'rake db:migrate:redo' to accept VERSION to target that migration
Reported by Philip Hallstrom | September 16th, 2008 @ 06:43 PM | in 2.x
I find I occasionally type:
rake db:migrate:redo VERSION=20080903190605
and expect it to redo that specific migration, but redo only redoes the most recent migration (or STEPS=x migrations).
I got tired of writing:
rake db:migrate:down VERSION=20080903190605
rake db:migrate:up VERSION=20080903190605
So have patched the rake task to automatically run :down and :up if VERSION is specified for :redo, otherwise default to it's original behavior (:down, :migrate)
There are no tests as I couldn't find where rake tasks were tested. If I've missed it point it out and I'll write tests. Imperical testing suggests it works.
Comments and changes to this ticket
-
Eloy Duran September 17th, 2008 @ 09:39 AM
- Tag changed from enhancement, railties, rake to enhancement, patch, railties, rake
+1
-
Michael Koziarski September 17th, 2008 @ 10:15 AM
- State changed from new to committed
c47525a58397851895b25f7c1bba06b30b0f6b5d fixes this
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>