mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-08-02 11:23:27 +00:00
16 lines
379 B
Ruby
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
|