Created
January 28, 2010 11:49
-
-
Save slaskis/288652 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
namespace :db do | |
require "models" | |
desc "WARNING! Resets the db!" | |
task :migrate do | |
puts "Are you sure? This will EMPTY the database. (y/n)" | |
if STDIN.gets.chomp == "y" | |
DataMapper.auto_migrate! | |
end | |
end | |
desc "Runs DataMapper.auto_upgrade!" | |
task :upgrade do | |
DataMapper.auto_upgrade! | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment