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
bf059163
Commit
bf059163
authored
Feb 01, 2012
by
David Ormsbee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix migration to reflect the right table name for registration
parent
167d2dd8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
courseware/migrations/0001_initial.py
+3
-3
courseware/migrations/0002_add_indexes.py
+1
-1
courseware/models.py
+3
-1
No files found.
courseware/migrations/0001_initial.py
View file @
bf059163
...
...
@@ -37,7 +37,7 @@ class Migration(SchemaMigration):
db
.
send_create_signal
(
'courseware'
,
[
'UserProfile'
])
# Adding model 'Registration'
db
.
create_table
(
'auth_
userprofile
'
,
(
db
.
create_table
(
'auth_
registration
'
,
(
(
'id'
,
self
.
gf
(
'django.db.models.fields.AutoField'
)(
primary_key
=
True
)),
(
'user'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
to
=
orm
[
'auth.User'
],
unique
=
True
)),
(
'activation_key'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
unique
=
True
,
max_length
=
32
,
db_index
=
True
)),
...
...
@@ -57,7 +57,7 @@ class Migration(SchemaMigration):
db
.
delete_table
(
'auth_userprofile'
)
# Deleting model 'Registration'
db
.
delete_table
(
'auth_
userprofile
'
)
db
.
delete_table
(
'auth_
registration
'
)
models
=
{
...
...
@@ -123,7 +123,7 @@ class Migration(SchemaMigration):
'name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'100'
})
},
'courseware.registration'
:
{
'Meta'
:
{
'object_name'
:
'Registration'
,
'db_table'
:
"'auth_
userprofile
'"
},
'Meta'
:
{
'object_name'
:
'Registration'
,
'db_table'
:
"'auth_
registration
'"
},
'activation_key'
:
(
'django.db.models.fields.CharField'
,
[],
{
'unique'
:
'True'
,
'max_length'
:
'32'
,
'db_index'
:
'True'
}),
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'user'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
"orm['auth.User']"
,
'unique'
:
'True'
})
...
...
courseware/migrations/0002_add_indexes.py
View file @
bf059163
...
...
@@ -123,7 +123,7 @@ class Migration(SchemaMigration):
'name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'100'
})
},
'courseware.registration'
:
{
'Meta'
:
{
'object_name'
:
'Registration'
,
'db_table'
:
"'auth_
userprofile
'"
},
'Meta'
:
{
'object_name'
:
'Registration'
,
'db_table'
:
"'auth_
registration
'"
},
'activation_key'
:
(
'django.db.models.fields.CharField'
,
[],
{
'unique'
:
'True'
,
'max_length'
:
'32'
,
'db_index'
:
'True'
}),
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'user'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
"orm['auth.User']"
,
'unique'
:
'True'
})
...
...
courseware/models.py
View file @
bf059163
import
uuid
from
django.db
import
models
from
django.contrib.auth.models
import
User
...
...
@@ -55,7 +57,7 @@ class Registration(models.Model):
account, but that account is inactive. Once the user clicks
on the activation key, it becomes active. '''
class
Meta
:
db_table
=
"auth_
userprofile
"
db_table
=
"auth_
registration
"
user
=
models
.
ForeignKey
(
User
,
unique
=
True
)
activation_key
=
models
.
CharField
((
'activation key'
),
max_length
=
32
,
unique
=
True
,
db_index
=
True
)
...
...
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