Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #10349 from caliper-io/mute_psql_output

Fix noisy output when running rake db:schema:load on postgreSQL and structure.sql
  • Loading branch information...
commit c68b6f0638fc1b5f8b6b1b5202de476a0ac431ea 2 parents ebd7cc6 + 2496bd9
@tenderlove tenderlove authored
View
4 activerecord/CHANGELOG.md
@@ -1,3 +1,7 @@
+* Mute `psql` output when running rake db:schema:load.
+
+ *Godfrey Chan*
+
* Trigger a save on `has_one association=(associate)` when the associate contents have changed.
Fix #8856.
View
2  activerecord/lib/active_record/tasks/postgresql_database_tasks.rb
@@ -59,7 +59,7 @@ def structure_dump(filename)
def structure_load(filename)
set_psql_env
- Kernel.system("psql -f #{filename} #{configuration['database']}")
+ Kernel.system("psql -q -f #{filename} #{configuration['database']}")
end
private
View
2  activerecord/test/cases/tasks/postgresql_rake_test.rb
@@ -227,7 +227,7 @@ def setup
def test_structure_load
filename = "awesome-file.sql"
- Kernel.expects(:system).with("psql -f #{filename} my-app-db")
+ Kernel.expects(:system).with("psql -q -f #{filename} my-app-db")
ActiveRecord::Tasks::DatabaseTasks.structure_load(@configuration, filename)
end
Please sign in to comment.
Something went wrong with that request. Please try again.