Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / migrations / 0014_auto__add_unique_astakosuser_third_party_identifier_provider.py @ 304acb60

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

    
14

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

    
20

    
21
    models = {
22
        'auth.group': {
23
            'Meta': {'object_name': 'Group'},
24
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
25
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
26
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
27
        },
28
        'auth.permission': {
29
            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
30
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
31
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
32
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
33
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
34
        },
35
        'auth.user': {
36
            'Meta': {'object_name': 'User'},
37
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
38
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
39
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
40
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
41
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
42
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
43
            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
44
            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
45
            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
46
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
47
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
48
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
49
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
50
        },
51
        'contenttypes.contenttype': {
52
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
53
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
54
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
55
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
56
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
57
        },
58
        'im.additionalmail': {
59
            'Meta': {'object_name': 'AdditionalMail'},
60
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
61
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
62
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"})
63
        },
64
        'im.approvalterms': {
65
            'Meta': {'object_name': 'ApprovalTerms'},
66
            'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 7, 9, 10, 24, 0, 566720)', 'db_index': 'True'}),
67
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
68
            'location': ('django.db.models.fields.CharField', [], {'max_length': '255'})
69
        },
70
        'im.astakosuser': {
71
            'Meta': {'unique_together': "(('provider', 'third_party_identifier'),)", 'object_name': 'AstakosUser', '_ormbases': ['auth.User']},
72
            'activation_sent': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
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, 7, 9, 10, 24, 0, 568837)'}),
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
        'im.service': {
109
            'Meta': {'object_name': 'Service'},
110
            'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
111
            'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
112
            'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
113
            'icon': ('django.db.models.fields.FilePathField', [], {'max_length': '100', 'blank': 'True'}),
114
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
115
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
116
            'url': ('django.db.models.fields.FilePathField', [], {'max_length': '100'})
117
        }
118
    }
119

    
120
    complete_apps = ['im']