Do not populate AccountSummaries and FollowRecommendation views on migration (#16173)
Materializing those views can take a while, and they are currently refreshed anyway each time they are actually used, in the FollowRecommendationsScheduler.
This commit is contained in:
parent
a5f91a11d0
commit
d8e0c8a89e
2 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
class CreateAccountSummaries < ActiveRecord::Migration[5.2]
|
class CreateAccountSummaries < ActiveRecord::Migration[5.2]
|
||||||
def change
|
def change
|
||||||
create_view :account_summaries, materialized: true
|
create_view :account_summaries, materialized: { no_data: true }
|
||||||
|
|
||||||
# To be able to refresh the view concurrently,
|
# To be able to refresh the view concurrently,
|
||||||
# at least one unique index is required
|
# at least one unique index is required
|
||||||
|
|
|
@ -4,7 +4,7 @@ class UpdateFollowRecommendationsToVersion2 < ActiveRecord::Migration[6.1]
|
||||||
|
|
||||||
def up
|
def up
|
||||||
drop_view :follow_recommendations
|
drop_view :follow_recommendations
|
||||||
create_view :follow_recommendations, version: 2, materialized: true
|
create_view :follow_recommendations, version: 2, materialized: { no_data: true }
|
||||||
|
|
||||||
# To be able to refresh the view concurrently,
|
# To be able to refresh the view concurrently,
|
||||||
# at least one unique index is required
|
# at least one unique index is required
|
||||||
|
|
Loading…
Reference in a new issue