Ticket #17659: django-logentry-index.diff

File django-logentry-index.diff, 900 bytes (added by keeff+django@…, 13 years ago)

Patch to add indexes to django_admin_log

  • django/contrib/admin/models.py

     
    1919    action_time = models.DateTimeField(_('action time'), auto_now=True)
    2020    user = models.ForeignKey(User)
    2121    content_type = models.ForeignKey(ContentType, blank=True, null=True)
    22     object_id = models.TextField(_('object id'), blank=True, null=True)
    23     object_repr = models.CharField(_('object repr'), max_length=200)
     22    object_id = models.TextField(_('object id'), blank=True, null=True, db_index=True)
     23    object_repr = models.CharField(_('object repr'), max_length=200, db_index=True)
    2424    action_flag = models.PositiveSmallIntegerField(_('action flag'))
    2525    change_message = models.TextField(_('change message'), blank=True)
    2626    objects = LogEntryManager()
Back to Top