discourse-ai/db/migrate/20230314184514_migrate_disc...

14 lines
391 B
Ruby

# frozen_string_literal: true
class MigrateDiscourseAiReviewables < ActiveRecord::Migration[7.0]
def up
DB.exec("UPDATE reviewables SET type='ReviewableAiPost' WHERE type='ReviewableAIPost'")
DB.exec(
"UPDATE reviewables SET type='ReviewableAiChatMessage' WHERE type='ReviewableAIChatMessage'",
)
end
def down
raise ActiveRecord::IrreversibleMigration
end
end