Commit bf059163 by David Ormsbee

fix migration to reflect the right table name for registration

parent 167d2dd8
......@@ -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'})
......
......@@ -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'})
......
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)
......
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