mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
Update README.textile
Use database.yml configuration tweak instead of postgres.conf when ActiveRecord ORM
This commit is contained in:
parent
35e2060667
commit
9d40404c44
1 changed files with 9 additions and 2 deletions
|
@ -226,7 +226,15 @@ DatabaseCleaner has an autodetect mechanism where if you do not explicitly defin
|
|||
h4. STDERR is being flooded when using Postgres
|
||||
|
||||
If you are using Postgres and have foreign key constraints, the truncation strategy will cause a lot of extra noise to appear on STDERR (in
|
||||
the form of "NOTICE truncate cascades" messages). To silence these warnings set the following log level in your database.yml file:
|
||||
the form of "NOTICE truncate cascades" messages).
|
||||
|
||||
To silence these warnings set the following log level in your postgresql.conf file:
|
||||
|
||||
<pre>
|
||||
client_min_messages = warning
|
||||
</pre>
|
||||
|
||||
For ActiveRecord, you add the following parameter in your database.yml file:
|
||||
|
||||
<pre>
|
||||
test:
|
||||
|
@ -235,7 +243,6 @@ test:
|
|||
min_messages: WARNING
|
||||
</pre>
|
||||
|
||||
|
||||
h2. Debugging
|
||||
|
||||
In rare cases DatabaseCleaner will encounter errors that it will log. By default it uses STDOUT set to the ERROR level but you can configure this to use whatever Logger you desire. Here's an example of using the Rails.logger in env.rb:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue