feat: Add a view for mentions (#3505)
- Added a new table mentions for saving user mentions - Added a filter conversation_type in the API - Added a view to see the mentions
This commit is contained in:
13
db/migrate/20211201224513_create_mentions.rb
Normal file
13
db/migrate/20211201224513_create_mentions.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateMentions < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
create_table :mentions do |t|
|
||||
t.references :user, null: false, foreign_key: true
|
||||
t.references :conversation, null: false, foreign_key: true
|
||||
t.references :account, index: true, null: false
|
||||
t.datetime :mentioned_at, null: false
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :mentions, [:user_id, :conversation_id], unique: true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user