Permalink
Browse files

Merge pull request #4140 from kuroda/databases_rake

Reconnect to the first database after db:create
  • Loading branch information...
2 parents 4379c45 + 014cdb7 commit ac2f68dd7498ec9de6dd6312cc347593adb5084e @tenderlove tenderlove committed Dec 23, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 activerecord/lib/active_record/railties/databases.rake
@@ -38,6 +38,7 @@ db_namespace = namespace :db do
desc 'Create the database from config/database.yml for the current Rails.env (use db:create:all to create all dbs in the config)'
task :create => :load_config do
configs_for_environment.each { |config| create_database(config) }
+ ActiveRecord::Base.establish_connection(configs_for_environment.first)
end
def mysql_creation_options(config)

0 comments on commit ac2f68d

Please sign in to comment.