discourse/db/migrate/20150709021818_add_like_cou...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
330 B
Ruby
Raw Normal View History

# 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