diff options
author | Roberto Miranda <rjmaltamar@gmail.com> | 2019-04-02 16:45:37 +0100 |
---|---|---|
committer | Roberto Miranda <rjmaltamar@gmail.com> | 2019-04-02 17:04:32 +0100 |
commit | 900e566a6b8eab17a9955c9be84d2443dc837995 (patch) | |
tree | 297184340a0f531e6b5944b35db6dbb909df293d /activerecord/lib | |
parent | 098e4d25f19f2b932841401fdc5e7340876d8ff2 (diff) | |
download | rails-900e566a6b8eab17a9955c9be84d2443dc837995.tar.gz rails-900e566a6b8eab17a9955c9be84d2443dc837995.tar.bz2 rails-900e566a6b8eab17a9955c9be84d2443dc837995.zip |
💇
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index ef8292de2b..447def8d77 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -225,12 +225,10 @@ db_namespace = namespace :db do desc "Runs setup if database does not exist, or runs migrations if it does" task prepare: :load_config do ActiveRecord::Base.configurations.configs_for(env_name: Rails.env).each do |db_config| - begin - ActiveRecord::Base.establish_connection(db_config.config) - db_namespace["migrate"].invoke - rescue ActiveRecord::NoDatabaseError - db_namespace["setup"].invoke - end + ActiveRecord::Base.establish_connection(db_config.config) + db_namespace["migrate"].invoke + rescue ActiveRecord::NoDatabaseError + db_namespace["setup"].invoke end end |