mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 03:06:53 +08:00
FIX: Make chat editor IDs not null (#18903)
Follow up to 766bcbc6840c9d665055441bcd77616b3a96e10e Makes ChatMessage.last_editor_id and ChatMessageRevision.user_id NOT NULL since they are always filled in now and the last commit had a migration to backfill this data.
This commit is contained in:
@ -93,9 +93,12 @@ class Chat::MessageMover
|
||||
destination_channel_id: destination_channel.id,
|
||||
}
|
||||
moved_message_ids = DB.query_single(<<~SQL, query_args)
|
||||
INSERT INTO chat_messages(chat_channel_id, user_id, message, cooked, cooked_version, created_at, updated_at)
|
||||
INSERT INTO chat_messages(
|
||||
chat_channel_id, user_id, last_editor_id, message, cooked, cooked_version, created_at, updated_at
|
||||
)
|
||||
SELECT :destination_channel_id,
|
||||
user_id,
|
||||
last_editor_id,
|
||||
message,
|
||||
cooked,
|
||||
cooked_version,
|
||||
|
Reference in New Issue
Block a user