<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -113,8 +113,16 @@ namespace :db do
   end
 
   namespace :migrate do
-    desc  'Rollbacks the database one migration and re migrate up. If you want to rollback more than one step, define STEP=x'
-    task :redo =&gt; [ 'db:rollback', 'db:migrate' ]
+    desc  'Rollbacks the database one migration and re migrate up. If you want to rollback more than one step, define STEP=x. Target specific version with VERSION=x.'
+    task :redo =&gt; :environment do
+      if ENV[&quot;VERSION&quot;]
+        Rake::Task[&quot;db:migrate:down&quot;].invoke
+        Rake::Task[&quot;db:migrate:up&quot;].invoke
+      else
+        Rake::Task[&quot;db:rollback&quot;].invoke
+        Rake::Task[&quot;db:migrate&quot;].invoke
+      end
+    end
 
     desc 'Resets your database using your migrations for the current environment'
     task :reset =&gt; [&quot;db:drop&quot;, &quot;db:create&quot;, &quot;db:migrate&quot;]</diff>
      <filename>railties/lib/tasks/databases.rake</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4db7e8de1160de6c813a33266fa415849e25fba6</id>
    </parent>
  </parents>
  <author>
    <name>Philip Hallstrom</name>
    <email>philip@pjkh.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/c47525a58397851895b25f7c1bba06b30b0f6b5d</url>
  <id>c47525a58397851895b25f7c1bba06b30b0f6b5d</id>
  <committed-date>2008-09-17T02:14:21-07:00</committed-date>
  <authored-date>2008-09-16T10:38:13-07:00</authored-date>
  <message>make db:migrate:redo rake task accept an optional VERSION to target that specific migration to redo

Signed-off-by: Michael Koziarski &lt;michael@koziarski.com&gt;</message>
  <tree>8ffbb9993a267df3f7931dc9c68d764bbd694146</tree>
  <committer>
    <name>Michael Koziarski</name>
    <email>michael@koziarski.com</email>
  </committer>
</commit>
