diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-08-05 20:38:02 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-08-05 20:46:27 -0300 |
commit | 0fb6bbdf7e708691ab3ed320868b7bcebfc68885 (patch) | |
tree | c655cf70f617f382c4aae974bb19f81ce1e0320b /activerecord/lib/active_record/railties | |
parent | a48ea6800ef712440b08c551f8041feb35de8cb4 (diff) | |
download | rails-0fb6bbdf7e708691ab3ed320868b7bcebfc68885.tar.gz rails-0fb6bbdf7e708691ab3ed320868b7bcebfc68885.tar.bz2 rails-0fb6bbdf7e708691ab3ed320868b7bcebfc68885.zip |
Merge pull request #7140 from seamusabshere/patch-1
Make sure :environment task is executed before db:schema:load or
db:structure:load
Conflicts:
activerecord/CHANGELOG.md
Diffstat (limited to 'activerecord/lib/active_record/railties')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 79032fe4df..83d9126ccb 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -369,7 +369,7 @@ db_namespace = namespace :db do end end - task :load_if_ruby => 'db:create' do + task :load_if_ruby => [:environment, 'db:create'] do db_namespace["schema:load"].invoke if ActiveRecord::Base.schema_format == :ruby end end @@ -445,7 +445,7 @@ db_namespace = namespace :db do end end - task :load_if_sql => 'db:create' do + task :load_if_sql => [:environment, 'db:create'] do db_namespace["structure:load"].invoke if ActiveRecord::Base.schema_format == :sql end end |