mirror of
https://github.com/discourse/discourse.git
synced 2025-02-08 20:34:52 +00:00
This is a followup of the previous refactor where we created two new models to handle all the dedicated logic that was present in the `ChatChannel` model. For the sake of consistency, `DMChannel` has been renamed to `DirectMessageChannel` and the previous `DirectMessageChannel` model is now named `DirectMessage`. This should help reasoning about direct messages.
10 lines
262 B
Ruby
10 lines
262 B
Ruby
# frozen_string_literal: true
|
|
|
|
class MigrateDmChannels < ActiveRecord::Migration[7.0]
|
|
def up
|
|
DB.exec(
|
|
"UPDATE chat_channels SET type='DirectMessageChannel', chatable_type='DirectMessage' WHERE chatable_type = 'DirectMessageChannel'",
|
|
)
|
|
end
|
|
end
|