Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (14 sloc) 468 Bytes
require './lib/backpack.rb'
namespace :db do
task :populate do
DataMapper::setup(:default, ENV['DATABASE_URL'] || "mysql://root:root@localhost/backpack")
DataMapper.auto_migrate!
DummyData.new.populate
puts "Database emptied and populated with dummy data."
end
task :empty do
DataMapper::setup(:default, ENV['DATABASE_URL'] || "mysql://root:root@localhost/backpack")
DataMapper.auto_migrate!
puts "Database emptied"
end
end
Jump to Line
Something went wrong with that request. Please try again.