Code nazi told me to put db_index=True at the front of the queue

This commit is contained in:
Scott Adams 2015-10-19 04:24:12 +02:00
parent c4ed32b89b
commit 26237a9863

View file

@ -160,7 +160,7 @@ class LogEntry(models.Model):
)
content_type = models.ForeignKey('contenttypes.ContentType', on_delete=models.CASCADE, related_name='+', verbose_name=_("content type"))
object_pk = models.TextField(verbose_name=_("object pk"), db_index=True)
object_pk = models.TextField(db_index=True, verbose_name=_("object pk"))
object_id = models.BigIntegerField(blank=True, db_index=True, null=True, verbose_name=_("object id"))
object_repr = models.TextField(verbose_name=_("object representation"))
action = models.PositiveSmallIntegerField(choices=Action.choices, verbose_name=_("action"))