Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / migrations / 0008_auto__add_emailchange.py @ 304acb60

History | View | Annotate | Download (7.8 kB)

1
# encoding: utf-8
2
import datetime
3
from south.db import db
4
from south.v2 import SchemaMigration
5
from django.db import models
6

    
7
class Migration(SchemaMigration):
8

    
9
    def forwards(self, orm):
10
        
11
        # Adding model 'EmailChange'
12
        db.create_table('im_emailchange', (
13
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14
            ('new_email_address', self.gf('django.db.models.fields.EmailField')(max_length=75)),
15
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='emailchange_user', unique=True, to=orm['im.AstakosUser'])),
16
            ('requested_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2012, 5, 3, 12, 23, 46, 711119))),
17
            ('activation_key', self.gf('django.db.models.fields.CharField')(unique=True, max_length=40, db_index=True)),
18
        ))
19
        db.send_create_signal('im', ['EmailChange'])
20

    
21

    
22
    def backwards(self, orm):
23
        
24
        # Deleting model 'EmailChange'
25
        db.delete_table('im_emailchange')
26

    
27

    
28
    models = {
29
        'auth.group': {
30
            'Meta': {'object_name': 'Group'},
31
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
32
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
33
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
34
        },
35
        'auth.permission': {
36
            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
37
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
38
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
39
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
40
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
41
        },
42
        'auth.user': {
43
            'Meta': {'object_name': 'User'},
44
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
45
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
46
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
47
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
48
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
49
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
50
            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
51
            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
52
            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
53
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
54
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
55
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
56
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
57
        },
58
        'contenttypes.contenttype': {
59
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
60
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
61
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
62
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
63
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
64
        },
65
        'im.approvalterms': {
66
            'Meta': {'object_name': 'ApprovalTerms'},
67
            'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 3, 12, 23, 46, 709576)', 'db_index': 'True'}),
68
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
69
            'location': ('django.db.models.fields.CharField', [], {'max_length': '255'})
70
        },
71
        'im.astakosuser': {
72
            'Meta': {'object_name': 'AstakosUser', '_ormbases': ['auth.User']},
73
            'affiliation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
74
            'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
75
            'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
76
            'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
77
            'date_signed_terms': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
78
            'email_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
79
            'has_credits': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
80
            'has_signed_terms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
81
            'invitations': ('django.db.models.fields.IntegerField', [], {'default': '100'}),
82
            'is_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
83
            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
84
            'provider': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
85
            'third_party_identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
86
            'updated': ('django.db.models.fields.DateTimeField', [], {}),
87
            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'})
88
        },
89
        'im.emailchange': {
90
            'Meta': {'object_name': 'EmailChange'},
91
            'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40', 'db_index': 'True'}),
92
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
93
            'new_email_address': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
94
            'requested_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 3, 12, 23, 46, 711119)'}),
95
            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'emailchange_user'", 'unique': 'True', 'to': "orm['im.AstakosUser']"})
96
        },
97
        'im.invitation': {
98
            'Meta': {'object_name': 'Invitation'},
99
            'code': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True'}),
100
            'consumed': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
101
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
102
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
103
            'inviter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'invitations_sent'", 'null': 'True', 'to': "orm['im.AstakosUser']"}),
104
            'is_consumed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
105
            'realname': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
106
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
107
        }
108
    }
109

    
110
    complete_apps = ['im']