Posted By

rduv on 10/10/06


Tagged

migrate


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

webstic


remigrate


 / Published in: Ruby
 

URL: http://www.bigbold.com/snippets/tag/rails/2

  1. desc "Drop then recreate the dev database, migrate up, and load fixtures" task :remigrate => :environment do return unless %w[development test staging].include? RAILS_ENV ActiveRecord::Base.connection.tables.each { |t| ActiveRecord::Base.connection.drop_table t } Rake::Task[:migrate].invoke Rake::Task["db:fixtures:load"].invoke end

Report this snippet  

You need to login to post a comment.