mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Mute psql output when running rake db:schema:load
This commit is contained in:
parent
ebd7cc6f45
commit
2496bd9a98
3 changed files with 6 additions and 2 deletions
|
@ -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.
|
* Trigger a save on `has_one association=(associate)` when the associate contents have changed.
|
||||||
|
|
||||||
Fix #8856.
|
Fix #8856.
|
||||||
|
|
|
@ -59,7 +59,7 @@ module ActiveRecord
|
||||||
|
|
||||||
def structure_load(filename)
|
def structure_load(filename)
|
||||||
set_psql_env
|
set_psql_env
|
||||||
Kernel.system("psql -f #{filename} #{configuration['database']}")
|
Kernel.system("psql -q -f #{filename} #{configuration['database']}")
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -227,7 +227,7 @@ module ActiveRecord
|
||||||
|
|
||||||
def test_structure_load
|
def test_structure_load
|
||||||
filename = "awesome-file.sql"
|
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)
|
ActiveRecord::Tasks::DatabaseTasks.structure_load(@configuration, filename)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue