diff options
author | Starfall <us@starfall.systems> | 2023-04-14 19:22:47 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2023-04-14 19:22:47 -0500 |
commit | 4fe1689de43f4404eb9530fcfbcbfb26d6c1c13a (patch) | |
tree | 6811b845bb7f4966b10dcefa3dea404246f161c7 /db/migrate/20170716191202_add_hide_notifications_to_mute.rb | |
parent | 65c1e53a32cabcdbb7bca57002bb0f6acdebe07e (diff) | |
parent | bed63f6dae0879ac840066b031229e0d139089cd (diff) |
Diffstat (limited to 'db/migrate/20170716191202_add_hide_notifications_to_mute.rb')
-rw-r--r-- | db/migrate/20170716191202_add_hide_notifications_to_mute.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/db/migrate/20170716191202_add_hide_notifications_to_mute.rb b/db/migrate/20170716191202_add_hide_notifications_to_mute.rb index de7d2a4a2..a498396b7 100644 --- a/db/migrate/20170716191202_add_hide_notifications_to_mute.rb +++ b/db/migrate/20170716191202_add_hide_notifications_to_mute.rb @@ -1,5 +1,15 @@ +require Rails.root.join('lib', 'mastodon', 'migration_helpers') + class AddHideNotificationsToMute < ActiveRecord::Migration[5.1] - def change - add_column :mutes, :hide_notifications, :boolean, default: false, 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 |