mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 13:09:33 -06:00
0a5f548635
As part of this move, we are also renaming `discourse-chat` to `chat`.
21 lines
529 B
Ruby
21 lines
529 B
Ruby
# frozen_string_literal: true
|
|
|
|
class CreateDirectMessageTables < ActiveRecord::Migration[6.1]
|
|
def change
|
|
create_table :direct_message_channels do |t|
|
|
t.timestamps
|
|
end
|
|
|
|
create_table :direct_message_users do |t|
|
|
t.integer :direct_message_channel_id, null: false
|
|
t.integer :user_id, null: false
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :direct_message_users,
|
|
%i[direct_message_channel_id user_id],
|
|
unique: true,
|
|
name: "direct_message_users_index"
|
|
end
|
|
end
|