photomix/lib/tasks/db.rake

11 lines
295 B
Ruby
Raw Permalink Normal View History

2012-07-24 23:26:16 +02:00
namespace :db do
desc 'Remove and install new database from scratch'
task :install => :environment do
ActiveRecord::Base.connection.tables.each do |x|
ActiveRecord::Base.connection.drop_table x
end
Rake::Task['db:migrate'].invoke
Rake::Task['db:seed'].invoke
end
end