Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / migrations / 0014_auto__add_unique_astakosuser_third_party_identifier_provider.py @ 6f979a1a

History | View | Annotate | Download (8.6 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
        return
10
        # Adding unique constraint on 'AstakosUser', fields ['third_party_identifier', 'provider']
11
        db.create_unique(
12
            'im_astakosuser', ['third_party_identifier', 'provider'])
13

    
14
    def backwards(self, orm):
15
        return
16
        # Removing unique constraint on 'AstakosUser', fields ['third_party_identifier', 'provider']
17
        db.delete_unique(
18
            'im_astakosuser', ['third_party_identifier', 'provider'])
19

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

    
119
    complete_apps = ['im']