/apps/users/migrations/0022_auto__add_field_userprofile_allows_community_sites__add_field_userprof.py

https://github.com/pombredanne/mozillians · Python · 121 lines · 105 code · 11 blank · 5 comment · 0 complexity · 4657c657e974f039a8f429d4d69b4edc MD5 · raw file

  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. class Migration(SchemaMigration):
  7. def forwards(self, orm):
  8. # Adding field 'UserProfile.allows_community_sites'
  9. db.add_column('profile', 'allows_community_sites', self.gf('django.db.models.fields.BooleanField')(default=True), keep_default=False)
  10. # Adding field 'UserProfile.allows_mozilla_sites'
  11. db.add_column('profile', 'allows_mozilla_sites', self.gf('django.db.models.fields.BooleanField')(default=True), keep_default=False)
  12. def backwards(self, orm):
  13. # Deleting field 'UserProfile.allows_community_sites'
  14. db.delete_column('profile', 'allows_community_sites')
  15. # Deleting field 'UserProfile.allows_mozilla_sites'
  16. db.delete_column('profile', 'allows_mozilla_sites')
  17. models = {
  18. 'auth.group': {
  19. 'Meta': {'object_name': 'Group'},
  20. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  21. 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
  22. 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
  23. },
  24. 'auth.permission': {
  25. 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
  26. 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  27. 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
  28. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  29. 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
  30. },
  31. 'auth.user': {
  32. 'Meta': {'object_name': 'User'},
  33. 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 10, 25, 4, 3, 36, 467048)'}),
  34. 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
  35. 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  36. 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
  37. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  38. 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
  39. 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  40. 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  41. 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 10, 25, 4, 3, 36, 466963)'}),
  42. 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  43. 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
  44. 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
  45. 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
  46. },
  47. 'contenttypes.contenttype': {
  48. 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
  49. 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  50. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  51. 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  52. 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
  53. },
  54. 'groups.group': {
  55. 'Meta': {'object_name': 'Group', 'db_table': "'group'"},
  56. 'always_auto_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  57. 'auto_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
  58. 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}),
  59. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  60. 'irc_channel': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '63', 'blank': 'True'}),
  61. 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
  62. 'steward': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['users.UserProfile']", 'null': 'True', 'blank': 'True'}),
  63. 'system': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
  64. 'url': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}),
  65. 'website': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200', 'blank': 'True'}),
  66. 'wiki': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200', 'blank': 'True'})
  67. },
  68. 'groups.language': {
  69. 'Meta': {'object_name': 'Language'},
  70. 'always_auto_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  71. 'auto_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
  72. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  73. 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'})
  74. },
  75. 'groups.skill': {
  76. 'Meta': {'object_name': 'Skill'},
  77. 'always_auto_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  78. 'auto_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
  79. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  80. 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'})
  81. },
  82. 'users.usernameblacklist': {
  83. 'Meta': {'ordering': "['value']", 'object_name': 'UsernameBlacklist'},
  84. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  85. 'is_regex': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  86. 'value': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
  87. },
  88. 'users.userprofile': {
  89. 'Meta': {'object_name': 'UserProfile', 'db_table': "'profile'"},
  90. 'allows_community_sites': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
  91. 'allows_mozilla_sites': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
  92. 'bio': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
  93. 'city': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}),
  94. 'country': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}),
  95. 'display_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}),
  96. 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['groups.Group']", 'symmetrical': 'False', 'blank': 'True'}),
  97. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  98. 'ircname': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '63', 'blank': 'True'}),
  99. 'is_vouched': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  100. 'languages': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['groups.Language']", 'symmetrical': 'False', 'blank': 'True'}),
  101. 'last_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}),
  102. 'photo': ('sorl.thumbnail.fields.ImageField', [], {'default': "''", 'max_length': '100', 'blank': 'True'}),
  103. 'region': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}),
  104. 'skills': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['groups.Skill']", 'symmetrical': 'False', 'blank': 'True'}),
  105. 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}),
  106. 'vouched_by': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['users.UserProfile']", 'null': 'True', 'blank': 'True'}),
  107. 'website': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200', 'null': 'True', 'blank': 'True'})
  108. }
  109. }
  110. complete_apps = ['users']