chore: Add controllers for conversation participants (#6462)
Co-authored-by: Aswin Dev P.S <aswindevps@gmail.com> Co-authored-by: Sojan Jose <sojan@chatwoot.com>
This commit is contained in:
11
db/migrate/20220808193420_add_conversation_participants.rb
Normal file
11
db/migrate/20220808193420_add_conversation_participants.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class AddConversationParticipants < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
create_table 'conversation_participants', force: :cascade do |t|
|
||||
t.references :account, null: false
|
||||
t.references :user, null: false
|
||||
t.references :conversation, null: false
|
||||
t.datetime 'created_at', precision: 6, null: false
|
||||
t.datetime 'updated_at', precision: 6, null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddUniqueIndexToConversationParticipants < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_index :conversation_participants, [:user_id, :conversation_id], unique: true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user