diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2018-07-11 16:03:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-11 16:03:43 -0400 |
commit | f16fdefe3243978aef11204b12c25b86c022ca7a (patch) | |
tree | 1f45e2b717b3875ea20a52c0a025ca92cf304c9c | |
parent | 7fc499d1353f98b96c09ee755045e4aa37880962 (diff) | |
parent | 3ae999faf386361545e56eae5406ffd2820dcb2e (diff) | |
download | rails-f16fdefe3243978aef11204b12c25b86c022ca7a.tar.gz rails-f16fdefe3243978aef11204b12c25b86c022ca7a.tar.bz2 rails-f16fdefe3243978aef11204b12c25b86c022ca7a.zip |
Merge pull request #28327 from rngtng/add-seed-dependency
Add missing env & config dependency to `rake db:seed`
-rw-r--r-- | activerecord/CHANGELOG.md | 5 | ||||
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index b0027cd2fb..d1ae41ab97 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,8 @@ +* Add environment & load_config dependency to `bin/rake db:seed` to enable + seed load in environments without Rails and custom DB configuration + + *Tobias Bielohlawek* + * Fix default value for mysql time types with specified precision. *Nikolay Kondratyev* diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 24449e8df3..8b7d18fb3d 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -217,7 +217,7 @@ db_namespace = namespace :db do task setup: ["db:schema:load_if_ruby", "db:structure:load_if_sql", :seed] desc "Loads the seed data from db/seeds.rb" - task :seed do + task seed: :load_config do db_namespace["abort_if_pending_migrations"].invoke ActiveRecord::Tasks::DatabaseTasks.load_seed end |