Skip to content

Instantly share code, notes, and snippets.

@mpakus
Forked from le0pard/test.rb
Created September 21, 2021 16:30
Show Gist options
  • Save mpakus/304899e103560db66cd11a329f1110e7 to your computer and use it in GitHub Desktop.
Save mpakus/304899e103560db66cd11a329f1110e7 to your computer and use it in GitHub Desktop.
unlogged tables in rails for test env
# 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