mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-29 14:35:06 +01:00
Fix incorrect notification settings migration for non-followers (#33348)
This commit is contained in:
parent
3f8f06eb46
commit
85792cc375
@ -9,7 +9,7 @@ class MigrateNotificationsPolicyV2 < ActiveRecord::Migration[7.1]
|
|||||||
def up
|
def up
|
||||||
NotificationPolicy.in_batches.update_all(<<~SQL.squish)
|
NotificationPolicy.in_batches.update_all(<<~SQL.squish)
|
||||||
for_not_following = CASE filter_not_following WHEN true THEN 1 ELSE 0 END,
|
for_not_following = CASE filter_not_following WHEN true THEN 1 ELSE 0 END,
|
||||||
for_not_followers = CASE filter_not_following WHEN true THEN 1 ELSE 0 END,
|
for_not_followers = CASE filter_not_followers WHEN true THEN 1 ELSE 0 END,
|
||||||
for_new_accounts = CASE filter_new_accounts WHEN true THEN 1 ELSE 0 END,
|
for_new_accounts = CASE filter_new_accounts WHEN true THEN 1 ELSE 0 END,
|
||||||
for_private_mentions = CASE filter_private_mentions WHEN true THEN 1 ELSE 0 END
|
for_private_mentions = CASE filter_private_mentions WHEN true THEN 1 ELSE 0 END
|
||||||
SQL
|
SQL
|
||||||
|
@ -9,7 +9,7 @@ class PostDeploymentMigrateNotificationsPolicyV2 < ActiveRecord::Migration[7.1]
|
|||||||
def up
|
def up
|
||||||
NotificationPolicy.in_batches.update_all(<<~SQL.squish)
|
NotificationPolicy.in_batches.update_all(<<~SQL.squish)
|
||||||
for_not_following = CASE filter_not_following WHEN true THEN 1 ELSE 0 END,
|
for_not_following = CASE filter_not_following WHEN true THEN 1 ELSE 0 END,
|
||||||
for_not_followers = CASE filter_not_following WHEN true THEN 1 ELSE 0 END,
|
for_not_followers = CASE filter_not_followers WHEN true THEN 1 ELSE 0 END,
|
||||||
for_new_accounts = CASE filter_new_accounts WHEN true THEN 1 ELSE 0 END,
|
for_new_accounts = CASE filter_new_accounts WHEN true THEN 1 ELSE 0 END,
|
||||||
for_private_mentions = CASE filter_private_mentions WHEN true THEN 1 ELSE 0 END
|
for_private_mentions = CASE filter_private_mentions WHEN true THEN 1 ELSE 0 END
|
||||||
SQL
|
SQL
|
||||||
|
Loading…
Reference in New Issue
Block a user