mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 07:49:29 +00:00
Make AddHideNotificationsToMute Concurrent
It's not clear how much this will benefit instances in practice, as the number of mutes tends to be pretty small, but this should prevent any blocking migrations nonetheless.
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
class AddHideNotificationsToMute < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
add_column :mutes, :hide_notifications, :boolean, default: true, null: false
|
||||
include Mastodon::MigrationHelpers
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
add_column_with_default :mutes, :hide_notifications, :boolean, default: true, allow_null: false
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :mutes, :hide_notifications
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user