Fix down clause for notification policy v2 migrations (#33340)
This commit is contained in:
		
							parent
							
								
									668ce14ff2
								
							
						
					
					
						commit
						db749c7d2b
					
				| 
						 | 
					@ -18,7 +18,7 @@ class MigrateNotificationsPolicyV2 < ActiveRecord::Migration[7.1]
 | 
				
			||||||
  def down
 | 
					  def down
 | 
				
			||||||
    NotificationPolicy.in_batches.update_all(<<~SQL.squish)
 | 
					    NotificationPolicy.in_batches.update_all(<<~SQL.squish)
 | 
				
			||||||
      filter_not_following = CASE for_not_following WHEN 0 THEN false ELSE true END,
 | 
					      filter_not_following = CASE for_not_following WHEN 0 THEN false ELSE true END,
 | 
				
			||||||
      filter_not_following = CASE for_not_followers WHEN 0 THEN false ELSE true END,
 | 
					      filter_not_followers = CASE for_not_followers WHEN 0 THEN false ELSE true END,
 | 
				
			||||||
      filter_new_accounts = CASE for_new_accounts WHEN 0 THEN false ELSE true END,
 | 
					      filter_new_accounts = CASE for_new_accounts WHEN 0 THEN false ELSE true END,
 | 
				
			||||||
      filter_private_mentions = CASE for_private_mentions WHEN 0 THEN false ELSE true END
 | 
					      filter_private_mentions = CASE for_private_mentions WHEN 0 THEN false ELSE true END
 | 
				
			||||||
    SQL
 | 
					    SQL
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,7 +18,7 @@ class PostDeploymentMigrateNotificationsPolicyV2 < ActiveRecord::Migration[7.1]
 | 
				
			||||||
  def down
 | 
					  def down
 | 
				
			||||||
    NotificationPolicy.in_batches.update_all(<<~SQL.squish)
 | 
					    NotificationPolicy.in_batches.update_all(<<~SQL.squish)
 | 
				
			||||||
      filter_not_following = CASE for_not_following WHEN 0 THEN false ELSE true END,
 | 
					      filter_not_following = CASE for_not_following WHEN 0 THEN false ELSE true END,
 | 
				
			||||||
      filter_not_following = CASE for_not_followers WHEN 0 THEN false ELSE true END,
 | 
					      filter_not_followers = CASE for_not_followers WHEN 0 THEN false ELSE true END,
 | 
				
			||||||
      filter_new_accounts = CASE for_new_accounts WHEN 0 THEN false ELSE true END,
 | 
					      filter_new_accounts = CASE for_new_accounts WHEN 0 THEN false ELSE true END,
 | 
				
			||||||
      filter_private_mentions = CASE for_private_mentions WHEN 0 THEN false ELSE true END
 | 
					      filter_private_mentions = CASE for_private_mentions WHEN 0 THEN false ELSE true END
 | 
				
			||||||
    SQL
 | 
					    SQL
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue