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 | 74ede4d3b306ac49052ee1a91737068f5da7a89b (patch) | |
tree | 7d3f57ec13a117bbbaa8cd9e5117b2478456cd0f /archaeological_context_records/models.py | |
parent | a2ae7228cae62c4fde1f9554372162d322e69aa9 (diff) | |
download | Ishtar-74ede4d3b306ac49052ee1a91737068f5da7a89b.tar.bz2 Ishtar-74ede4d3b306ac49052ee1a91737068f5da7a89b.zip |
Performance: add indexes for cached labels
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r-- | archaeological_context_records/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 2f02ed9df..9162a8aa0 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -302,7 +302,8 @@ class ContextRecord(BulkUpdatedItem, BaseHistorizedItem, point_2d = models.PointField(_(u"Point (2D)"), blank=True, null=True) point = models.PointField(_(u"Point (3D)"), blank=True, null=True, dim=3) polygon = models.PolygonField(_(u"Polygon"), blank=True, null=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: |