diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2012-09-19 12:08:19 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2012-09-19 12:08:19 -0700 |
commit | 01059d7f7fcf2780c425895e4bdd5395edb6436b (patch) | |
tree | badd86bea5ecf5baa63f8bf7be2fda98f2dec1c7 | |
parent | e04818d1b8de44d47003031791f142182320ed89 (diff) | |
download | rails-01059d7f7fcf2780c425895e4bdd5395edb6436b.tar.gz rails-01059d7f7fcf2780c425895e4bdd5395edb6436b.tar.bz2 rails-01059d7f7fcf2780c425895e4bdd5395edb6436b.zip |
Load the environment after creating the database
-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 30b85f8c8f..d134978128 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -245,7 +245,7 @@ db_namespace = namespace :db do end end - task :load_if_ruby => 'db:create' do + task :load_if_ruby => ['db:create', :environment] do db_namespace["schema:load"].invoke if ActiveRecord::Base.schema_format == :ruby end @@ -328,7 +328,7 @@ db_namespace = namespace :db do end end - task :load_if_sql => 'db:create' do + task :load_if_sql => ['db:create', :environment] do db_namespace["structure:load"].invoke if ActiveRecord::Base.schema_format == :sql end end |