diff options
-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" |