mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-07-05 14:02:13 +00:00
17 lines
553 B
Ruby
17 lines
553 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class CopySummarySectionsToAiSummaries < ActiveRecord::Migration[7.0]
|
||
|
def up
|
||
|
execute <<-SQL
|
||
|
INSERT INTO ai_summaries (id, target_id, target_type, content_range, summarized_text, original_content_sha, algorithm, created_at, updated_at)
|
||
|
SELECT id, target_id, target_type, content_range, summarized_text, original_content_sha, algorithm, created_at, updated_at
|
||
|
FROM summary_sections
|
||
|
WHERE meta_section_id IS NULL
|
||
|
SQL
|
||
|
end
|
||
|
|
||
|
def down
|
||
|
raise ActiveRecord::IrreversibleMigration
|
||
|
end
|
||
|
end
|