diff options
author | Roberto Miranda <rjmaltamar@gmail.com> | 2019-03-27 17:10:44 +0000 |
---|---|---|
committer | Roberto Miranda <rjmaltamar@gmail.com> | 2019-03-27 17:10:44 +0000 |
commit | 8375b8ee6da72152193df409c91f7f35f71b6836 (patch) | |
tree | 3cca0544073863323367b47f23c7d2ecc95f3980 | |
parent | c6734789ad80a83670bd69c96602a79c1bec36d2 (diff) | |
download | rails-8375b8ee6da72152193df409c91f7f35f71b6836.tar.gz rails-8375b8ee6da72152193df409c91f7f35f71b6836.tar.bz2 rails-8375b8ee6da72152193df409c91f7f35f71b6836.zip |
Move db:migrate call to else block
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 2328529817..b022fe942a 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -225,9 +225,10 @@ db_namespace = namespace :db do desc "Setup database if doesn’t exist already and run migrations" task prepare: :load_config do ActiveRecord::Base.connection - db_namespace["migrate"].invoke rescue ActiveRecord::NoDatabaseError db_namespace["setup"].invoke + else + db_namespace["migrate"].invoke end desc "Loads the seed data from db/seeds.rb" |