Permalink
Browse files

[bug 911831] Add initial South migrations

* adds South to INSTALLED_APPS
* adds initial migrations for all Kitsune apps that have models
* adds some inspection hints to things that cause problems
* adds last schematic migration to switch us to South
  • Loading branch information...
1 parent f164938 commit fa412aa2c029bb8cfefb600b3fa7f393819e1602 @willkg willkg committed Sep 9, 2013
Showing with 2,156 additions and 1 deletion.
  1. +88 −0 kitsune/announcements/migrations/0001_initial.py
  2. 0 kitsune/announcements/migrations/__init__.py
  3. +103 −0 kitsune/customercare/migrations/0001_initial.py
  4. 0 kitsune/customercare/migrations/__init__.py
  5. +193 −0 kitsune/dashboards/migrations/0001_initial.py
  6. 0 kitsune/dashboards/migrations/__init__.py
  7. +90 −0 kitsune/flagit/migrations/0001_initial.py
  8. 0 kitsune/flagit/migrations/__init__.py
  9. +143 −0 kitsune/forums/migrations/0001_initial.py
  10. 0 kitsune/forums/migrations/__init__.py
  11. +149 −0 kitsune/gallery/migrations/0001_initial.py
  12. 0 kitsune/gallery/migrations/__init__.py
  13. +89 −0 kitsune/groups/migrations/0001_initial.py
  14. 0 kitsune/groups/migrations/__init__.py
  15. +48 −0 kitsune/inproduct/migrations/0001_initial.py
  16. 0 kitsune/inproduct/migrations/__init__.py
  17. +115 −0 kitsune/karma/migrations/0001_initial.py
  18. 0 kitsune/karma/migrations/__init__.py
  19. +193 −0 kitsune/kbforums/migrations/0001_initial.py
  20. 0 kitsune/kbforums/migrations/__init__.py
  21. +59 −0 kitsune/kpi/migrations/0001_initial.py
  22. 0 kitsune/kpi/migrations/__init__.py
  23. +156 −0 kitsune/postcrash/migrations/0001_initial.py
  24. 0 kitsune/postcrash/migrations/__init__.py
  25. +77 −0 kitsune/products/migrations/0001_initial.py
  26. 0 kitsune/products/migrations/__init__.py
  27. +307 −0 kitsune/questions/migrations/0001_initial.py
  28. 0 kitsune/questions/migrations/__init__.py
  29. +36 −0 kitsune/search/migrations/0001_initial.py
  30. 0 kitsune/search/migrations/__init__.py
  31. +2 −0 kitsune/settings.py
  32. +6 −0 kitsune/sumo/models.py
  33. +10 −0 kitsune/tags/models.py
  34. +76 −0 kitsune/upload/migrations/0001_initial.py
  35. 0 kitsune/upload/migrations/__init__.py
  36. +151 −0 kitsune/users/migrations/0001_initial.py
  37. 0 kitsune/users/migrations/__init__.py
  38. +21 −1 kitsune/users/models.py
  39. +44 −0 migrations/232-switch-to-south.sql
@@ -0,0 +1,88 @@
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding model 'Announcement'
+ db.create_table('announcements_announcement', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
+ ('creator', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
+ ('show_after', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, db_index=True)),
+ ('show_until', self.gf('django.db.models.fields.DateTimeField')(db_index=True, null=True, blank=True)),
+ ('content', self.gf('django.db.models.fields.TextField')(max_length=10000)),
+ ('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.Group'], null=True, blank=True)),
+ ('locale', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['wiki.Locale'], null=True, blank=True)),
+ ))
+ db.send_create_signal('announcements', ['Announcement'])
+
+
+ def backwards(self, orm):
+ # Deleting model 'Announcement'
+ db.delete_table('announcements_announcement')
+
+
+ models = {
+ 'announcements.announcement': {
+ 'Meta': {'object_name': 'Announcement'},
+ 'content': ('django.db.models.fields.TextField', [], {'max_length': '10000'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
+ 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'locale': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['wiki.Locale']", 'null': 'True', 'blank': 'True'}),
+ 'show_after': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'show_until': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'})
+ },
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'wiki.locale': {
+ 'Meta': {'ordering': "['locale']", 'object_name': 'Locale'},
+ 'editors': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'locales_editor'", 'blank': 'True', 'to': "orm['auth.User']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'leaders': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'locales_leader'", 'blank': 'True', 'to': "orm['auth.User']"}),
+ 'locale': ('django.db.models.fields.CharField', [], {'max_length': '7', 'db_index': 'True'}),
+ 'reviewers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'locales_reviewer'", 'blank': 'True', 'to': "orm['auth.User']"})
+ }
+ }
+
+ complete_apps = ['announcements']
@@ -0,0 +1,103 @@
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding model 'Tweet'
+ db.create_table('customercare_tweet', (
+ ('tweet_id', self.gf('django.db.models.fields.BigIntegerField')(primary_key=True)),
+ ('raw_json', self.gf('django.db.models.fields.TextField')()),
+ ('locale', self.gf('django.db.models.fields.CharField')(max_length=20, db_index=True)),
+ ('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, db_index=True)),
+ ('reply_to', self.gf('django.db.models.fields.related.ForeignKey')(related_name='replies', null=True, to=orm['customercare.Tweet'])),
+ ('hidden', self.gf('django.db.models.fields.BooleanField')(default=False, db_index=True)),
+ ))
+ db.send_create_signal('customercare', ['Tweet'])
+
+ # Adding model 'Reply'
+ db.create_table('customercare_reply', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('user', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='tweet_replies', null=True, to=orm['auth.User'])),
+ ('twitter_username', self.gf('django.db.models.fields.CharField')(max_length=20)),
+ ('tweet_id', self.gf('django.db.models.fields.BigIntegerField')()),
+ ('raw_json', self.gf('django.db.models.fields.TextField')()),
+ ('locale', self.gf('django.db.models.fields.CharField')(max_length=20)),
+ ('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, db_index=True)),
+ ('reply_to_tweet_id', self.gf('django.db.models.fields.BigIntegerField')()),
+ ))
+ db.send_create_signal('customercare', ['Reply'])
+
+
+ def backwards(self, orm):
+ # Deleting model 'Tweet'
+ db.delete_table('customercare_tweet')
+
+ # Deleting model 'Reply'
+ db.delete_table('customercare_reply')
+
+
+ models = {
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'customercare.reply': {
+ 'Meta': {'object_name': 'Reply'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'locale': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
+ 'raw_json': ('django.db.models.fields.TextField', [], {}),
+ 'reply_to_tweet_id': ('django.db.models.fields.BigIntegerField', [], {}),
+ 'tweet_id': ('django.db.models.fields.BigIntegerField', [], {}),
+ 'twitter_username': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'tweet_replies'", 'null': 'True', 'to': "orm['auth.User']"})
+ },
+ 'customercare.tweet': {
+ 'Meta': {'ordering': "('-tweet_id',)", 'object_name': 'Tweet'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+ 'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
+ 'locale': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'}),
+ 'raw_json': ('django.db.models.fields.TextField', [], {}),
+ 'reply_to': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'replies'", 'null': 'True', 'to': "orm['customercare.Tweet']"}),
+ 'tweet_id': ('django.db.models.fields.BigIntegerField', [], {'primary_key': 'True'})
+ }
+ }
+
+ complete_apps = ['customercare']
Oops, something went wrong.

0 comments on commit fa412aa

Please sign in to comment.