discourse/plugins/chat/db/migrate/20221018091412_migrate_chat_channels.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
318 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class MigrateChatChannels < ActiveRecord::Migration[7.0]
def up
DB.exec("UPDATE chat_channels SET type='CategoryChannel' WHERE chatable_type = 'Category'")
DB.exec(
"UPDATE chat_channels SET type='DMChannel' WHERE chatable_type = 'DirectMessageChannel'",
)
end
end