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:
Bianca Nenciu
2021-06-02 08:36:49 +03:00
committed by GitHub
parent eea9fead63
commit d9484db718
20 changed files with 186 additions and 62 deletions

View File

@@ -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