Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
526564c9
Commit
526564c9
authored
Aug 15, 2017
by
Clinton Blackburn
Committed by
Calen Pennington
Aug 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added indices to the Schedule model
These new indices will allow for more efficient querying of schedules.
parent
fb068fd7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
2 deletions
+33
-2
openedx/core/djangoapps/schedules/migrations/0002_auto_20170816_1532.py
+24
-0
openedx/core/djangoapps/schedules/models.py
+9
-2
No files found.
openedx/core/djangoapps/schedules/migrations/0002_auto_20170816_1532.py
0 → 100644
View file @
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
),
),
]
openedx/core/djangoapps/schedules/models.py
View file @
526564c9
...
...
@@ -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'
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment