Commit e9028ce8 by Calen Pennington Committed by GitHub

Merge pull request #15819 from edx/clintonb/schedule-indexes

Added indices to the Schedule model
parents ffd72c10 526564c9
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('schedules', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='schedule',
name='start',
field=models.DateTimeField(help_text='Date this schedule went into effect', db_index=True),
),
migrations.AlterField(
model_name='schedule',
name='upgrade_deadline',
field=models.DateTimeField(help_text='Deadline by which the learner must upgrade to a verified seat', null=True, db_index=True, blank=True),
),
]
......@@ -5,10 +5,17 @@ from django_extensions.db.models import TimeStampedModel
class Schedule(TimeStampedModel):
enrollment = models.OneToOneField('student.CourseEnrollment', null=False)
active = models.BooleanField(default=True, help_text=_('Indicates if this schedule is actively used'))
start = models.DateTimeField(help_text=_('Date this schedule went into effect'))
active = models.BooleanField(
default=True,
help_text=_('Indicates if this schedule is actively used')
)
start = models.DateTimeField(
db_index=True,
help_text=_('Date this schedule went into effect')
)
upgrade_deadline = models.DateTimeField(
blank=True,
db_index=True,
null=True,
help_text=_('Deadline by which the learner must upgrade to a verified seat')
)
......
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