mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 07:43:43 +08:00
30990006a9
This reduces chances of errors where consumers of strings mutate inputs and reduces memory usage of the app. Test suite passes now, but there may be some stuff left, so we will run a few sites on a branch prior to merging
14 lines
609 B
Ruby
14 lines
609 B
Ruby
# frozen_string_literal: true
|
|
|
|
class RenameModeratorSiteSettings < ActiveRecord::Migration[5.2]
|
|
def up
|
|
execute "UPDATE site_settings SET name = 'moderators_view_emails' WHERE name = 'show_email_on_profile'"
|
|
execute "UPDATE site_settings SET name = 'moderators_create_categories' WHERE name = 'allow_moderators_to_create_categories'"
|
|
end
|
|
|
|
def down
|
|
execute "UPDATE site_settings SET name = 'show_email_on_profile' WHERE name = 'moderators_view_emails'"
|
|
execute "UPDATE site_settings SET name = 'allow_moderators_to_create_categories' WHERE name = 'moderators_create_categories'"
|
|
end
|
|
end
|