add Annotation.findvalue index (used by findClips)

This commit is contained in:
j 2016-06-30 02:40:01 +02:00
parent b63024df02
commit b6e4d33a43
2 changed files with 3 additions and 2 deletions

View file

@ -96,7 +96,7 @@ class Annotation(models.Model):
layer = models.CharField(max_length=255, db_index=True)
value = models.TextField()
findvalue = models.TextField(null=True)
findvalue = models.TextField(null=True, db_index=settings.DB_GIN_TRGM)
sortvalue = models.CharField(max_length=1000, null=True, blank=True, db_index=True)
languages = models.CharField(max_length=255, null=True, blank=True)

View file

@ -37,6 +37,7 @@ class Command(BaseCommand):
for table, column in (
(models.ItemFind._meta.db_table, 'value'), # Item Find
(models.Clip._meta.db_table, 'findvalue'), # Clip Find
(models.Annotation._meta.db_table, 'findvalue'), # Annotation Find
(entity.models.Find._meta.db_table, 'value'), # Entity Find
):
cursor = connection.cursor()