mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
models: Add denormalized .realm column to Message.
This commit adds the OPTIONAL .realm attribute to Message (and ArchivedMessage), with the server changes for making new Messages have this set. Old Messages still have to be migrated to backfill this, before it can be non-nullable. Appropriate test changes to correctly set .realm for Messages the tests manually create are included here as well.
This commit is contained in:
committed by
Tim Abbott
parent
a4008d938a
commit
00b3546c9f
@@ -40,6 +40,7 @@ class TopicHistoryTest(ZulipTestCase):
|
||||
message = Message(
|
||||
sender=hamlet,
|
||||
recipient=recipient,
|
||||
realm=stream.realm,
|
||||
content="whatever",
|
||||
date_sent=timezone_now(),
|
||||
sending_client=get_client("whatever"),
|
||||
|
||||
Reference in New Issue
Block a user