【发布时间】:2012-04-28 01:06:23
【问题描述】:
可以说,我正在编写一个以“非标准”方式使用 MySQL 的应用程序。它严重依赖于动态创建/删除的表。
到目前为止,它运行正常。不过,这些规格并不让我高兴。每当我运行它们时,我都会收到大量 activerecord 的 ddl 日志消息。自己看:
SqlDailyEvents
-- create_table("11_daily_events_20120428")
-> 0.0032s
should create and drop a table
-- create_table("11_daily_events_20120428")
-> 0.0030s
should not create the same table twice
should not drop the same table twice
那是--format d。 --format p 看起来更糟!
如何关闭它?此日志似乎不受ActiveRecord::Base.logger 的影响(我尝试将其设置为nil)。
【问题讨论】:
标签: mysql ruby-on-rails ruby activerecord rspec