Commit 304fb680 by Kevin Falcone

Despite db_index=True, Django didn't generate an index

student_module_id is the primary way into this table, not having an
index is disastrous with real data.
parent fd4164de
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('coursewarehistoryextended', '0001_initial'),
]
operations = [
migrations.AlterIndexTogether(
name='studentmodulehistoryextended',
index_together=set([('student_module',)]),
),
]
...@@ -31,6 +31,7 @@ class StudentModuleHistoryExtended(BaseStudentModuleHistory): ...@@ -31,6 +31,7 @@ class StudentModuleHistoryExtended(BaseStudentModuleHistory):
class Meta(object): class Meta(object):
app_label = 'coursewarehistoryextended' app_label = 'coursewarehistoryextended'
get_latest_by = "created" get_latest_by = "created"
index_together = ['student_module']
id = UnsignedBigIntAutoField(primary_key=True) # pylint: disable=invalid-name id = UnsignedBigIntAutoField(primary_key=True) # pylint: disable=invalid-name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment