Add index on accuracy.
authorAlexandre Segura <mex.zktk@gmail.com>
Mon, 22 May 2017 12:11:44 +0200
changeset 519 fb295acc6c3c
parent 518 c4dcd3798188
child 520 d1e231a045ac
Add index on accuracy.
src/iconolab/migrations/0023_auto_20170522_1011.py
src/iconolab/models.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/iconolab/migrations/0023_auto_20170522_1011.py	Mon May 22 12:11:44 2017 +0200
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2017-05-22 10:11
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('iconolab', '0022_auto_20170516_1538'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='tagginginfo',
+            name='accuracy',
+            field=models.IntegerField(db_index=True),
+        ),
+    ]
--- a/src/iconolab/models.py	Mon May 22 12:06:23 2017 +0200
+++ b/src/iconolab/models.py	Mon May 22 12:11:44 2017 +0200
@@ -864,7 +864,7 @@
     revision = models.ForeignKey(
         'AnnotationRevision', on_delete=models.CASCADE)
     tag = models.ForeignKey('Tag', on_delete=models.CASCADE)
-    accuracy = models.IntegerField()
+    accuracy = models.IntegerField(db_index=True)
     relevancy = models.IntegerField()
 
     def __str__(self):