class method
self.create_unlogged_tables
Ruby on Rails 7.1.6
Since v6.0.6PostgreSQL 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
Source
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 116
class_attribute :create_unlogged_tables, default: false
Defined in activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb line 116
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::PostgreSQLAdapter