Skip to content

Commit

Permalink
Added db:migrate:redo and db:migrate:reset for rerunning existing mig…
Browse files Browse the repository at this point in the history
…rations #10431, (closes #10432) [matt]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8383 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Dec 14, 2007
1 parent 9187ed8 commit 3aa54c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion railties/CHANGELOG
@@ -1,6 +1,6 @@
*SVN* *SVN*


* Added db:migrate:redo for rerunning existing migrations #10431 [matt] * Added db:migrate:redo and db:migrate:reset for rerunning existing migrations #10431, #10432 [matt]


* RAILS_GEM_VERSION may be double-quoted also. #10443 [James Cox] * RAILS_GEM_VERSION may be double-quoted also. #10443 [James Cox]


Expand Down
3 changes: 3 additions & 0 deletions railties/lib/tasks/databases.rake
Expand Up @@ -89,6 +89,9 @@ namespace :db do
namespace :migrate do 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' desc 'Rollbacks the database one migration and re migrate up. If you want to rollback more than one step, define STEP=x'
task :redo => [ 'db:rollback', 'db:migrate' ] task :redo => [ 'db:rollback', 'db:migrate' ]

desc 'Resets your database using your migrations for the current environment'
task :reset => ["db:drop", "db:create", "db:migrate"]
end end


desc 'Rolls the schema back to the previous version. Specify the number of steps with STEP=n' desc 'Rolls the schema back to the previous version. Specify the number of steps with STEP=n'
Expand Down

0 comments on commit 3aa54c5

Please sign in to comment.