I can’t see this in the docs, but I presume it’s a solved problem.
I’m using ActiveRecord outside Rails, and my script loads a schema.rb dumped from another app. I want to load this schema without dumping the migration output to stdout, but replacing ActiveRecord::Base.logger doesn’t shut it up. What should I be overriding to stop the noise?
The trick is apparently in ActiveRecord::Migration:
This makes migrations not output information to $stdout. There is a convenience wrapper method called .suppress_messages, which you can use like this:
And yes, this is documented under Migration (but not under Schema, where I was looking).