Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
d141eb15
Commit
d141eb15
authored
8 years ago
by
Ahsan Ulhaq
Browse files
Options
Downloads
Patches
Plain Diff
Added unique constraint on email
ECOM-7085
parent
fd7de0ca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/djangoapps/student/migrations/0010_auto_20170207_0458.py
+18
-0
18 additions, 0 deletions
.../djangoapps/student/migrations/0010_auto_20170207_0458.py
openedx/core/lib/django_courseware_routers.py
+6
-4
6 additions, 4 deletions
openedx/core/lib/django_courseware_routers.py
with
24 additions
and
4 deletions
common/djangoapps/student/migrations/0010_auto_20170207_0458.py
0 → 100644
+
18
−
0
View file @
d141eb15
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'
student
'
,
'
0009_auto_20170111_0422
'
),
]
operations
=
[
migrations
.
RunSQL
(
"
create unique index email on auth_user (email);
"
,
"
drop index email on auth_user;
"
)
]
This diff is collapsed.
Click to expand it.
openedx/core/lib/django_courseware_routers.py
+
6
−
4
View file @
d141eb15
...
...
@@ -45,13 +45,15 @@ class StudentModuleHistoryExtendedRouter(object):
return
False
return
None
def
allow_migrate
(
self
,
db
,
model
):
# pylint: disable=unused-argument
def
allow_migrate
(
self
,
db
,
app_label
,
model_name
=
None
,
**
hints
):
# pylint: disable=unused-argument
"""
Only sync StudentModuleHistoryExtended to StudentModuleHistoryExtendedRouter.DATABASE_Name
"""
if
self
.
_is_csmh
(
model
):
return
db
==
self
.
DATABASE_NAME
elif
db
==
self
.
DATABASE_NAME
:
if
model_name
is
not
None
:
model
=
hints
.
get
(
'
model
'
)
if
self
.
_is_csmh
(
model
):
return
db
==
self
.
DATABASE_NAME
if
db
==
self
.
DATABASE_NAME
:
return
False
return
None
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment