discourse-follow/db/migrate/20210920045747_rename_follow_plugin_preference.rb
Bianca Nenciu 1337d91c93
DEV: Promote historic post_deploy migrations (#76)
This commit promotes all post_deploy migrations which existed in
Discourse v2.8.0 (timestamp <= 20220107014925)
2022-12-19 17:27:46 +02:00

19 lines
484 B
Ruby

# frozen_string_literal: true
class RenameFollowPluginPreference < ActiveRecord::Migration[6.1]
def up
DB.exec <<~SQL
UPDATE user_custom_fields ucf
SET name = 'notify_me_when_followed_creates_topic'
WHERE ucf.name = 'notify_me_when_followed_posts'
SQL
end
def down
DB.exec <<~SQL
UPDATE user_custom_fields ucf
SET name = 'notify_me_when_followed_posts'
WHERE ucf.name = 'notify_me_when_followed_creates_topic'
SQL
end
end