Skip to content
Snippets Groups Projects
Commit 304fb680 authored by Kevin Falcone's avatar Kevin Falcone
Browse files

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
No related branches found
No related tags found
No related merge requests found
# -*- 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment