discourse-ai/db/post_migrate/20241206115958_rebake_shared_ai_conversation_oneboxes.rb
2025-01-14 18:05:37 -03:00

16 lines
379 B
Ruby

# frozen_string_literal: true
class RebakeSharedAiConversationOneboxes < ActiveRecord::Migration[7.2]
def up
# Safe marking for rebake using raw SQL
DB.exec(<<~SQL)
UPDATE posts
SET baked_version = NULL
WHERE raw LIKE '%/discourse-ai/ai-bot/shared-ai-conversations/%';
SQL
end
def down
raise ActiveRecord::IrreversibleMigration
end
end