Change materialized views to be refreshed concurrently to avoid locks (#29015)
This commit is contained in:
parent
c4af668e5c
commit
fa0ba67753
7 changed files with 11 additions and 7 deletions
|
@ -6,7 +6,7 @@ class DropFollowRecommendations < ActiveRecord::Migration[7.0]
|
|||
end
|
||||
|
||||
def down
|
||||
create_view :follow_recommendations, version: 2, materialized: { no_data: true }
|
||||
create_view :follow_recommendations, version: 2, materialized: true
|
||||
safety_assured { add_index :follow_recommendations, :account_id, unique: true }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue