2019-05-13 09:55:44 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2019-05-03 14:26:37 -04:00
|
|
|
class RemoveLikeCountFromPostMenu < ActiveRecord::Migration[5.2]
|
|
|
|
|
def up
|
|
|
|
|
execute(<<~SQL)
|
|
|
|
|
UPDATE site_settings
|
|
|
|
|
SET value = REGEXP_REPLACE(REPLACE(REPLACE(value, 'like-count', ''), '||', '|'), '^\\|', '')
|
|
|
|
|
WHERE name = 'post_menu'
|
|
|
|
|
SQL
|
|
|
|
|
end
|
|
|
|
|
end
|