mirror of https://github.com/zulip/zulip.git
models: Create database indexes on auxiliary Message fields.
I suspect we'll want these for narrowing code at some point. (imported from commit d2077aa4d7a6967bb4cb7d9404a4db4fcf824343)
This commit is contained in:
parent
02d65664b4
commit
c21535d420
|
@ -405,9 +405,9 @@ def linebreak(string):
|
|||
class Message(models.Model):
|
||||
sender = models.ForeignKey(UserProfile)
|
||||
recipient = models.ForeignKey(Recipient)
|
||||
subject = models.CharField(max_length=MAX_SUBJECT_LENGTH)
|
||||
subject = models.CharField(max_length=MAX_SUBJECT_LENGTH, db_index=True)
|
||||
content = models.TextField()
|
||||
pub_date = models.DateTimeField('date published')
|
||||
pub_date = models.DateTimeField('date published', db_index=True)
|
||||
sending_client = models.ForeignKey(Client)
|
||||
|
||||
def __repr__(self):
|
||||
|
|
Loading…
Reference in New Issue