1 # -*- coding: utf-8 -*-
2 from south.utils import datetime_utils as datetime
3 from south.db import db
4 from south.v2 import SchemaMigration
5 from django.db import models
8 class Migration(SchemaMigration):
10 def forwards(self, orm):
11 # Removing unique constraint on 'OAuthConnection', fields ['user']
12 db.delete_unique(u'apiclient_oauthconnection', ['user_id'])
15 # Changing field 'OAuthConnection.user'
16 db.alter_column(u'apiclient_oauthconnection', 'user_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User']))
18 def backwards(self, orm):
20 # Changing field 'OAuthConnection.user'
21 db.alter_column(u'apiclient_oauthconnection', 'user_id', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True))
22 # Adding unique constraint on 'OAuthConnection', fields ['user']
23 db.create_unique(u'apiclient_oauthconnection', ['user_id'])
27 u'apiclient.oauthconnection': {
28 'Meta': {'object_name': 'OAuthConnection'},
29 'access': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
30 'beta': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
31 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
32 'token': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}),
33 'token_secret': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}),
34 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
37 'Meta': {'object_name': 'Group'},
38 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
39 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
40 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
43 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
44 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
45 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
46 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
47 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
50 'Meta': {'object_name': 'User'},
51 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
52 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
53 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
54 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
55 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
56 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
57 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
58 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
59 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
60 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
61 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
62 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
63 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
65 u'contenttypes.contenttype': {
66 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
67 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
68 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
69 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
70 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
74 complete_apps = ['apiclient']