Created
September 2, 2021 15:47
-
-
Save le0pard/a009a896fba5cbc22a0c0348e9309689 to your computer and use it in GitHub Desktop.
unlogged tables in rails for test env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# unlogged tables used to speedup tests, but its are not crash proof | |
config.to_prepare do | |
ActiveSupport.on_load(:active_record) do | |
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.create_unlogged_tables = true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment