mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Split link watched words from replace (#13196)
It was not clear that replace watched words can be used to replace text with URLs. This introduces a new watched word type that makes it easier to understand.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class MigrateWatchedWordsFromReplaceToLink < ActiveRecord::Migration[6.1]
|
||||
def up
|
||||
execute <<~SQL
|
||||
UPDATE watched_words
|
||||
SET action = 8
|
||||
WHERE action = 5 AND replacement ILIKE 'http%'
|
||||
SQL
|
||||
end
|
||||
|
||||
def down
|
||||
execute("UPDATE watched_words SET action = 5 WHERE action = 8")
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user