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
9afb0f8b
Commit
9afb0f8b
authored
Jul 22, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disabled student migration 0011, which had not net effect and was causing InnoDB errors.
parent
ef32adc1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
common/djangoapps/student/migrations/0011_auto__chg_field_courseenrollment_user__del_unique_courseenrollment_use.py
+14
-11
No files found.
common/djangoapps/student/migrations/0011_auto__chg_field_courseenrollment_user__del_unique_courseenrollment_use.py
View file @
9afb0f8b
...
@@ -8,19 +8,22 @@ from django.db import models
...
@@ -8,19 +8,22 @@ from django.db import models
class
Migration
(
SchemaMigration
):
class
Migration
(
SchemaMigration
):
def
forwards
(
self
,
orm
):
def
forwards
(
self
,
orm
):
# Removing unique constraint on 'CourseEnrollment', fields ['user']
# This table is dropped in a subsequent migration. This migration was causing problems when using InnoDB,
db
.
delete_unique
(
'student_courseenrollment'
,
[
'user_id'
])
# so we are just dropping it.
pass
# # Removing unique constraint on 'CourseEnrollment', fields ['user']
# Changing field 'CourseEnrollment.user'
# db.delete_unique('student_courseenrollment', ['user_id'])
db
.
alter_column
(
'student_courseenrollment'
,
'user_id'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
to
=
orm
[
'auth.User'
]))
#
#
# # Changing field 'CourseEnrollment.user'
# db.alter_column('student_courseenrollment', 'user_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User']))
def
backwards
(
self
,
orm
):
def
backwards
(
self
,
orm
):
pass
# Changing field 'CourseEnrollment.user'
#
#
Changing field 'CourseEnrollment.user'
db
.
alter_column
(
'student_courseenrollment'
,
'user_id'
,
self
.
gf
(
'django.db.models.fields.related.OneToOneField'
)(
to
=
orm
[
'auth.User'
],
unique
=
True
))
#
db.alter_column('student_courseenrollment', 'user_id', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True))
# Adding unique constraint on 'CourseEnrollment', fields ['user']
#
#
Adding unique constraint on 'CourseEnrollment', fields ['user']
db
.
create_unique
(
'student_courseenrollment'
,
[
'user_id'
])
#
db.create_unique('student_courseenrollment', ['user_id'])
models
=
{
models
=
{
...
...
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