Skip to content

Commit c68b6f0

Browse files
committed
Merge pull request rails#10349 from caliper-io/mute_psql_output
Fix noisy output when running rake db:schema:load on postgreSQL and structure.sql
2 parents ebd7cc6 + 2496bd9 commit c68b6f0

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

activerecord/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Mute `psql` output when running rake db:schema:load.
2+
3+
*Godfrey Chan*
4+
15
* Trigger a save on `has_one association=(associate)` when the associate contents have changed.
26

37
Fix #8856.

activerecord/lib/active_record/tasks/postgresql_database_tasks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def structure_dump(filename)
5959

6060
def structure_load(filename)
6161
set_psql_env
62-
Kernel.system("psql -f #{filename} #{configuration['database']}")
62+
Kernel.system("psql -q -f #{filename} #{configuration['database']}")
6363
end
6464

6565
private

activerecord/test/cases/tasks/postgresql_rake_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def setup
227227

228228
def test_structure_load
229229
filename = "awesome-file.sql"
230-
Kernel.expects(:system).with("psql -f #{filename} my-app-db")
230+
Kernel.expects(:system).with("psql -q -f #{filename} my-app-db")
231231

232232
ActiveRecord::Tasks::DatabaseTasks.structure_load(@configuration, filename)
233233
end

0 commit comments

Comments
 (0)