summaryrefslogtreecommitdiff
path: root/archaeological_finds/models_treatments.py
diff options
context:
space:
mode:
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
commit74ede4d3b306ac49052ee1a91737068f5da7a89b (patch)
tree7d3f57ec13a117bbbaa8cd9e5117b2478456cd0f /archaeological_finds/models_treatments.py
parenta2ae7228cae62c4fde1f9554372162d322e69aa9 (diff)
downloadIshtar-74ede4d3b306ac49052ee1a91737068f5da7a89b.tar.bz2
Ishtar-74ede4d3b306ac49052ee1a91737068f5da7a89b.zip
Performance: add indexes for cached labels
Diffstat (limited to 'archaeological_finds/models_treatments.py')
-rw-r--r--archaeological_finds/models_treatments.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py
index 0ffcd87fa..b4d98528b 100644
--- a/archaeological_finds/models_treatments.py
+++ b/archaeological_finds/models_treatments.py
@@ -115,7 +115,8 @@ class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem,
blank=True, null=True)
target_is_basket = models.BooleanField(_(u"Target a basket"),
default=False)
- cached_label = models.TextField(_(u"Cached name"), null=True, blank=True)
+ cached_label = models.TextField(_(u"Cached name"), null=True, blank=True,
+ db_index=True)
history = HistoricalRecords()
class Meta:
@@ -506,7 +507,8 @@ class TreatmentFile(DashboardFormItem, ClosedItem, BaseHistorizedItem,
reception_date = models.DateField(_(u'Reception date'), blank=True,
null=True)
comment = models.TextField(_(u"Comment"), null=True, blank=True)
- cached_label = models.TextField(_(u"Cached name"), null=True, blank=True)
+ cached_label = models.TextField(_(u"Cached name"), null=True, blank=True,
+ db_index=True)
history = HistoricalRecords()
class Meta: