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.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# -*- 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):
|
||||
class Meta(object):
|
||||
app_label = 'coursewarehistoryextended'
|
||||
get_latest_by = "created"
|
||||
index_together = ['student_module']
|
||||
|
||||
id = UnsignedBigIntAutoField(primary_key=True) # pylint: disable=invalid-name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user