mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
rake db:seed should check if the database have pending migrations [#5163 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
parent
f3e42292a5
commit
c96a505391
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue