Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / migrations / 0001_initial.py @ 775d5ad7

History | View | Annotate | Download (8.1 kB)

1
# encoding: utf-8
2
from south.db import db
3
from south.v2 import SchemaMigration
4

    
5

    
6
class Migration(SchemaMigration):
7

    
8
    def forwards(self, orm):
9

    
10
        # Adding model 'AstakosUser'
11
        db.create_table('im_astakosuser', (
12
            ('user_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True, primary_key=True)),
13
            ('affiliation', self.gf('django.db.models.fields.CharField')
14
             (default='', max_length=255)),
15
            ('provider', self.gf('django.db.models.fields.CharField')
16
             (default='', max_length=255)),
17
            ('level', self.gf(
18
                'django.db.models.fields.IntegerField')(default=4)),
19
            ('invitations', self.gf(
20
                'django.db.models.fields.IntegerField')(default=0)),
21
            ('auth_token', self.gf('django.db.models.fields.CharField')
22
             (max_length=32, null=True, blank=True)),
23
            ('auth_token_created', self.gf(
24
                'django.db.models.fields.DateTimeField')(null=True)),
25
            ('auth_token_expires', self.gf(
26
                'django.db.models.fields.DateTimeField')(null=True)),
27
            ('updated', self.gf('django.db.models.fields.DateTimeField')()),
28
            ('is_verified', self.gf(
29
                'django.db.models.fields.BooleanField')(default=False)),
30
        ))
31
        db.send_create_signal('im', ['AstakosUser'])
32

    
33
        # Adding model 'Invitation'
34
        db.create_table('im_invitation', (
35
            ('id', self.gf(
36
                'django.db.models.fields.AutoField')(primary_key=True)),
37
            ('inviter', self.gf('django.db.models.fields.related.ForeignKey')(related_name='invitations_sent', null=True, to=orm['im.AstakosUser'])),
38
            ('realname', self.gf(
39
                'django.db.models.fields.CharField')(max_length=255)),
40
            ('username', self.gf(
41
                'django.db.models.fields.CharField')(max_length=255)),
42
            ('code', self.gf(
43
                'django.db.models.fields.BigIntegerField')(db_index=True)),
44
            ('is_accepted', self.gf(
45
                'django.db.models.fields.BooleanField')(default=False)),
46
            ('is_consumed', self.gf(
47
                'django.db.models.fields.BooleanField')(default=False)),
48
            ('created', self.gf('django.db.models.fields.DateTimeField')
49
             (auto_now_add=True, blank=True)),
50
            ('accepted', self.gf('django.db.models.fields.DateTimeField')
51
             (null=True, blank=True)),
52
            ('consumed', self.gf('django.db.models.fields.DateTimeField')
53
             (null=True, blank=True)),
54
        ))
55
        db.send_create_signal('im', ['Invitation'])
56

    
57
    def backwards(self, orm):
58

    
59
        # Deleting model 'AstakosUser'
60
        db.delete_table('im_astakosuser')
61

    
62
        # Deleting model 'Invitation'
63
        db.delete_table('im_invitation')
64

    
65
    models = {
66
        'auth.group': {
67
            'Meta': {'object_name': 'Group'},
68
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
69
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
70
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
71
        },
72
        'auth.permission': {
73
            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
74
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
75
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
76
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
77
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
78
        },
79
        'auth.user': {
80
            'Meta': {'object_name': 'User'},
81
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
82
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
83
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
84
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
85
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
86
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
87
            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
88
            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
89
            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
90
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
91
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
92
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
93
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
94
        },
95
        'contenttypes.contenttype': {
96
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
97
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
98
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
99
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
100
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
101
        },
102
        'im.astakosuser': {
103
            'Meta': {'object_name': 'AstakosUser', '_ormbases': ['auth.User']},
104
            'affiliation': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
105
            'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
106
            'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
107
            'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
108
            'invitations': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
109
            'is_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
110
            'level': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
111
            'provider': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
112
            'updated': ('django.db.models.fields.DateTimeField', [], {}),
113
            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'})
114
        },
115
        'im.invitation': {
116
            'Meta': {'object_name': 'Invitation'},
117
            'accepted': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
118
            'code': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True'}),
119
            'consumed': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
120
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
121
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
122
            'inviter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'invitations_sent'", 'null': 'True', 'to': "orm['im.AstakosUser']"}),
123
            'is_accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
124
            'is_consumed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
125
            'realname': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
126
            'username': ('django.db.models.fields.CharField', [], {'max_length': '255'})
127
        }
128
    }
129

    
130
    complete_apps = ['im']