This post originated from an RSS feed registered with Ruby Buzz
by rwdaigle.
Original Post: What's New in Edge Rails: New Database Rake Tasks
Feed Title: Ryan's Scraps
Feed URL: http://feeds.feedburner.com/RyansScraps
Feed Description: Ryan Daigle's various technically inclined rants along w/ the "What's new in Edge Rails" series.
Want to create your database without having to drop into that pesky mysql command prompt? Then I believe rake db:create is your man. Don’t need that database anymore? Give rake db:drop a try. Want to tear down your database and re-create it, migrations and all? rake db:reset is your jack-of-all-trades then.
And all the options you’re used to when raking the database still apply:
12345
# Drop the test databaseRAILS_ENV=test rake db:drop# Recreate the staging database, but only migrate it to version 3RAILS_ENV=staging rake db:reset VERSION=3
If you haven’t made rake a part of your life yet, it’s time you do so.