UX: Merge settings related to muted tags. (#7656)

This commit is contained in:
Dan Ungureanu
2019-06-03 05:23:23 +03:00
committed by Sam
parent 0955d9ece9
commit c1e7a1b292
9 changed files with 70 additions and 11 deletions

View File

@ -0,0 +1,13 @@
# frozen_string_literal: true
class MergeRemoveMutedTagsFromLatestSiteSettings < ActiveRecord::Migration[5.2]
def up
execute "UPDATE site_settings SET value = 'always', data_type = 7 WHERE name = 'remove_muted_tags_from_latest' AND value = 't'"
execute "UPDATE site_settings SET value = 'never', data_type = 7 WHERE name = 'remove_muted_tags_from_latest' AND value = 'f'"
execute "DELETE FROM site_settings WHERE name = 'mute_other_present_tags'"
end
def down
raise ActiveRecord::IrreversibleMigration
end
end