Permalink
Browse files

rake db:seed should check if the database have pending migrations [#5163

 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent f3e4229 commit c96a50539121c4a722f354220c7f0e314b24804d @thiagopradi thiagopradi committed with josevalim Jul 20, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/railties/databases.rake
@@ -274,7 +274,7 @@ namespace :db do
task :setup => [ 'db:create', 'db:schema:load', 'db:seed' ]
desc 'Load the seed data from db/seeds.rb'
- task :seed => :environment do
+ task :seed => 'db:abort_if_pending_migrations' do
seed_file = File.join(Rails.root, 'db', 'seeds.rb')
load(seed_file) if File.exist?(seed_file)
end

0 comments on commit c96a505

Please sign in to comment.