mirror of
https://github.com/mastodon/mastodon.git
synced 2025-07-15 00:38:15 +00:00
20 lines
303 B
Ruby
20 lines
303 B
Ruby
# frozen_string_literal: true
|
|
|
|
module DatabaseViewRecord
|
|
extend ActiveSupport::Concern
|
|
|
|
class_methods do
|
|
def refresh
|
|
Scenic.database.refresh_materialized_view(
|
|
table_name,
|
|
concurrently: true,
|
|
cascade: false
|
|
)
|
|
end
|
|
end
|
|
|
|
def readonly?
|
|
true
|
|
end
|
|
end
|