DEV: Rebake posts w/ quotes to update category badge style (#24469)

Posts with quotes need to be rebaked to apply the new category badge
style css.

See: https://meta.discourse.org/t/285705
This commit is contained in:
Blake Erickson
2023-11-20 14:17:44 -07:00
committed by GitHub
parent e6370decfd
commit ef7e5ed9b4

View File

@@ -0,0 +1,15 @@
# frozen_string_literal: true
class TriggerPostRebakeCategoryStyleQuotes < ActiveRecord::Migration[7.0]
def up
DB.exec(<<~SQL)
UPDATE posts
SET baked_version = NULL
WHERE cooked LIKE '%blockquote%'
SQL
end
def down
raise ActiveRecord::IrreversibleMigration
end
end