mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Remove JoyPixels emoji option (#12197)
- removes the option from site settings - deletes the site setting on existing sites that have it - marks posts using emojis as requiring a rebake Note that the actual image files are not removed here, the plan is to remove them in a few weeks/months (when presumably the rebaking of old posts has been completed).
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class RemoveEmojiOneFromEmojiSetSiteSetting < ActiveRecord::Migration[6.0]
|
||||
def up
|
||||
result = execute("SELECT value FROM site_settings WHERE name='emoji_set' and value='emoji_one'")
|
||||
return unless result.count > 0
|
||||
|
||||
execute "DELETE FROM site_settings where name='emoji_set' and value='emoji_one'"
|
||||
execute "UPDATE posts SET baked_version = 0 WHERE cooked LIKE '%/images/emoji/emoji_one%'"
|
||||
end
|
||||
|
||||
def down
|
||||
# Cannot undo
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user