mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-04-30 08:55:17 +08:00
16 lines
330 B
Ruby
16 lines
330 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddLikeCountToPostMenu < ActiveRecord::Migration[4.2]
|
|
def up
|
|
execute <<SQL
|
|
UPDATE site_settings
|
|
SET value = replace(value, 'like', 'like-count|like')
|
|
WHERE name = 'post_menu'
|
|
AND value NOT LIKE '%like-count%'
|
|
SQL
|
|
end
|
|
|
|
def down
|
|
raise ActiveRecord::IrreversibleMigration
|
|
end
|
|
end
|