method

create_unlogged_tables

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
create_unlogged_tables public

PostgreSQL allows the creation of “unlogged” tables, which do not record data in the PostgreSQL Write-Ahead Log. This can make the tables faster, but significantly increases the risk of data loss if the database crashes. As a result, this should not be used in production environments. If you would like all created tables to be unlogged in the test environment you can add the following to your test.rb file:

ActiveSupport.on_load(:active_record_postgresqladapter) do
  self.create_unlogged_tables = true
end
Show source
Register or log in to add new notes.