diff options
author | Caleb Thompson <caleb@calebthompson.io> | 2014-12-04 14:03:18 -0700 |
---|---|---|
committer | Caleb Thompson <caleb@calebthompson.io> | 2014-12-04 14:11:02 -0700 |
commit | 382a70c875c9378991c13874c43afd958a5d3809 (patch) | |
tree | 00062eccc68bd2e613e194436bd593af3efeb6a1 /activerecord/lib/active_record/railties | |
parent | da13b9aedccf437df933eb8620c0029b6a502aa1 (diff) | |
download | rails-382a70c875c9378991c13874c43afd958a5d3809.tar.gz rails-382a70c875c9378991c13874c43afd958a5d3809.tar.bz2 rails-382a70c875c9378991c13874c43afd958a5d3809.zip |
Remove environment dependency for db:schema:load
All of the behavior :environment was giving (that db:schema:load needed)
was provided as well with :load_config.
This will address an issue introduced in
https://github.com/rails/rails/pull/15394. The fact that db:schema:load
now drops and creates the database causes the Octopus gem to have [an
issue](https://github.com/tchandy/octopus/issues/273) during the drop
step for the test database (which wasn't happening in db:schema:load
before). The error looks like:
ActiveRecord::StatementInvalid: PG::ObjectInUse: ERROR: cannot drop the currently open database
: DROP DATABASE IF EXISTS "app_test"
Because of the timing, this issue is present in master, 4-2-*, and
4.1.8.
A note to forlorn developers who might see this: "Additionally" in a
commit message means you should have a separate commit, with a separate
justification for changes. Small commits with big messages are your
friends.
Diffstat (limited to 'activerecord/lib/active_record/railties')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 6c09456c4d..4daf2a0e2b 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -240,7 +240,7 @@ db_namespace = namespace :db do end desc 'Load a schema.rb file into the database' - task :load => [:environment, :load_config] do + task :load => [:load_config] do ActiveRecord::Tasks::DatabaseTasks.load_schema_current(:ruby, ENV['SCHEMA']) end |