diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-12 13:17:17 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-12 13:17:17 +0200 |
commit | d658fbb5b55c6ce318383b535732763e810b6537 (patch) | |
tree | 7d3f57ec13a117bbbaa8cd9e5117b2478456cd0f /archaeological_warehouse/models.py | |
parent | 0c75a8c1300338ce0a03d3a1bb57959f48eaaf1a (diff) | |
download | Ishtar-d658fbb5b55c6ce318383b535732763e810b6537.tar.bz2 Ishtar-d658fbb5b55c6ce318383b535732763e810b6537.zip |
Performance: add indexes for cached labels
Diffstat (limited to 'archaeological_warehouse/models.py')
-rw-r--r-- | archaeological_warehouse/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index 41891b341..71f31981a 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -283,9 +283,9 @@ class Container(LightHistorizedItem, ImageModel): reference = models.CharField(_(u"Container ref."), max_length=40) comment = models.TextField(_(u"Comment"), null=True, blank=True) cached_label = models.CharField(_(u"Localisation"), max_length=500, - null=True, blank=True) + null=True, blank=True, db_index=True) cached_location = models.CharField(_(u"Cached location"), max_length=500, - null=True, blank=True) + null=True, blank=True, db_index=True) index = models.IntegerField(u"Container ID", default=0) external_id = models.TextField(_(u"External ID"), blank=True, null=True) auto_external_id = models.BooleanField( |