Created
March 17, 2013 21:47
-
-
Save christiannaths/5183798 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Drops, re-creates and re-migrates the database | |
# Usage: rake db:remigrate | |
namespace :db do | |
desc "Raise an error unless development environment" | |
task :dev_only do | |
raise "You can only use this in dev!" unless Rails.env == 'development' | |
end | |
desc "Drop, create, migrate then seed the development database" | |
task remigrate: [ | |
'environment', | |
'db:dev_only', | |
'db:drop', | |
'db:create', | |
'db:migrate' | |
] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment