DEV: Always create chat mention records (#20470)

Before this commit, we created a chat mention record only in case we wanted to send a notification about that mention to the user. Notifications were the only use case for the chat_mention db table. Now we want to use that table for other features, so we have to always create a chat_mention record.
This commit is contained in:
Andrei Prigorshnev
2023-03-07 19:07:11 +04:00
committed by GitHub
parent 1f88354c5e
commit fa543cda06
11 changed files with 278 additions and 84 deletions

View File

@@ -0,0 +1,11 @@
# frozen_string_literal: true
class MakeChatMentionNotificationIdNullable < ActiveRecord::Migration[7.0]
def up
change_column_null :chat_mentions, :notification_id, true
end
def down
raise ActiveRecord::IrreversibleMigration
end
end