Skip to content

Instantly share code, notes, and snippets.

@slaskis
Created January 28, 2010 11:49
Show Gist options
  • Save slaskis/288652 to your computer and use it in GitHub Desktop.
Save slaskis/288652 to your computer and use it in GitHub Desktop.
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