Skip to content

Instantly share code, notes, and snippets.

@le0pard
Created September 2, 2021 15:47
Show Gist options
  • Save le0pard/a009a896fba5cbc22a0c0348e9309689 to your computer and use it in GitHub Desktop.
Save le0pard/a009a896fba5cbc22a0c0348e9309689 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