text: # -*- 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):
          # Deleting model 'Category'
          db.delete_table(u'main_category')
  
          # Deleting field 'Event.category'
          db.delete_column(u'main_event', 'category_id')
  
          # Deleting field 'SuggestedEvent.category'
          db.delete_column(u'main_suggestedevent', 'category_id')
  
  
      def backwards(self, orm):
          # Adding model 'Category'
          db.create_table(u'main_category', (
              (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
              ('name', self.gf('django.db.models.fields.CharField')(max_length=50)),
          ))
          db.send_create_signal(u'main', ['Category'])
  
          # Adding field 'Event.category'
          db.add_column(u'main_event', 'category',
                        self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.Category'], null=True, on_delete=models.SET_NULL, blank=True),
                        keep_default=False)
  
          # Adding field 'SuggestedEvent.category'
          db.add_column(u'main_suggestedevent', 'category',
                        self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.Category'], null=True, on_delete=models.SET_NULL, blank=True),
                        keep_default=False)
  
  
      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'})
          },
          'main.approval': {
              'Meta': {'object_name': 'Approval'},
              'approved': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
              'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
              'event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['main.Event']"}),
              'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'processed': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
              'processed_time': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
              'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'})
          },
          'main.channel': {
              'Meta': {'ordering': "['name']", 'object_name': 'Channel'},
              'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 3, 30, 0, 0)'}),
              'description': ('django.db.models.fields.TextField', [], {}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'image': ('sorl.thumbnail.fields.ImageField', [], {'max_length': '100', 'blank': 'True'}),
              'image_is_banner': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
              'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['main.Channel']", 'null': 'True'}),
              'reverse_order': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'})
          },
          'main.curatedgroup': {
              'Meta': {'object_name': 'CuratedGroup'},
              'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 3, 30, 0, 0)'}),
              'event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['main.Event']"}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
              'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True'})
          },
          'main.event': {
              'Meta': {'object_name': 'Event'},
              'additional_links': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
              'archive_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
              'call_info': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
              'channels': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['main.Channel']", 'symmetrical': 'False'}),
              'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
              'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'creator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}),
              'description': ('django.db.models.fields.TextField', [], {}),
              'featured': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'location': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['main.Location']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
              'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
              'modified_user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'modified_user'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}),
              'participants': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['main.Participant']", 'symmetrical': 'False'}),
              'pin': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
              'placeholder_img': ('sorl.thumbnail.fields.ImageField', [], {'max_length': '100'}),
              'popcorn_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
              'privacy': ('django.db.models.fields.CharField', [], {'default': "'public'", 'max_length': '40', 'db_index': 'True'}),
              'remote_presenters': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
              'short_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
              'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '215', 'blank': 'True'}),
              'start_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
              'status': ('django.db.models.fields.CharField', [], {'default': "'initiated'", 'max_length': '20', 'db_index': 'True'}),
              'tags': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['main.Tag']", 'symmetrical': 'False', 'blank': 'True'}),
              'template': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['main.Template']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
              'template_environment': ('airmozilla.main.fields.EnvironmentField', [], {'blank': 'True'}),
              'title': ('django.db.models.fields.CharField', [], {'max_length': '200'})
          },
          'main.eventhitstats': {
              'Meta': {'object_name': 'EventHitStats'},
              'event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['main.Event']", 'unique': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 3, 30, 0, 0)'}),
              'shortcode': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
              'total_hits': ('django.db.models.fields.IntegerField', [], {})
          },
          'main.eventoldslug': {
              'Meta': {'object_name': 'EventOldSlug'},
              'event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['main.Event']"}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '215'})
          },
          'main.eventtweet': {
              'Meta': {'object_name': 'EventTweet'},
              'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
              'error': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
              'event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['main.Event']"}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'include_placeholder': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'send_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 3, 30, 0, 0)'}),
              'sent_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
              'text': ('django.db.models.fields.CharField', [], {'max_length': '140'}),
              'tweet_id': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'})
          },
          'main.location': {
              'Meta': {'object_name': 'Location'},
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '300'}),
              'timezone': ('django.db.models.fields.CharField', [], {'max_length': '250'})
          },
          'main.participant': {
              'Meta': {'object_name': 'Participant'},
              'blog_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
              'clear_token': ('django.db.models.fields.CharField', [], {'max_length': '36', 'blank': 'True'}),
              'cleared': ('django.db.models.fields.CharField', [], {'default': "'no'", 'max_length': '15', 'db_index': 'True'}),
              'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'participant_creator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}),
              'department': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
              'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'irc': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
              'photo': ('sorl.thumbnail.fields.ImageField', [], {'max_length': '100', 'blank': 'True'}),
              'role': ('django.db.models.fields.CharField', [], {'max_length': '25'}),
              'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '65', 'blank': 'True'}),
              'team': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
              'topic_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
              'twitter': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'})
          },
          'main.suggestedevent': {
              'Meta': {'object_name': 'SuggestedEvent'},
              'accepted': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['main.Event']", 'null': 'True', 'blank': 'True'}),
              'additional_links': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
              'call_info': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
              'channels': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['main.Channel']", 'symmetrical': 'False'}),
              'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 3, 30, 0, 0)'}),
              'description': ('django.db.models.fields.TextField', [], {}),
              'featured': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'first_submitted': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'location': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['main.Location']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
              'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
              'participants': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['main.Participant']", 'symmetrical': 'False'}),
              'placeholder_img': ('sorl.thumbnail.fields.ImageField', [], {'max_length': '100'}),
              'popcorn_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
              'privacy': ('django.db.models.fields.CharField', [], {'default': "'public'", 'max_length': '40'}),
              'remote_presenters': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
              'review_comments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
              'short_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
              'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '215', 'blank': 'True'}),
              'start_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
              'submitted': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
              'tags': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['main.Tag']", 'symmetrical': 'False', 'blank': 'True'}),
              'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
              'upcoming': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
              'upload': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'upload'", 'null': 'True', 'to': "orm['uploads.Upload']"}),
              'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
          },
          'main.suggestedeventcomment': {
              'Meta': {'object_name': 'SuggestedEventComment'},
              'comment': ('django.db.models.fields.TextField', [], {}),
              'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 3, 30, 0, 0)'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'suggested_event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['main.SuggestedEvent']"}),
              'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'})
          },
          'main.tag': {
              'Meta': {'object_name': 'Tag'},
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
          },
          'main.template': {
              'Meta': {'object_name': 'Template'},
              'content': ('django.db.models.fields.TextField', [], {}),
              'default_popcorn_template': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
          },
          'main.urlmatch': {
              'Meta': {'object_name': 'URLMatch'},
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
              'string': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
              'use_count': ('django.db.models.fields.IntegerField', [], {'default': '0'})
          },
          'main.urltransform': {
              'Meta': {'object_name': 'URLTransform'},
              'find': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'match': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['main.URLMatch']"}),
              'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
              'replace_with': ('django.db.models.fields.CharField', [], {'max_length': '200'})
          },
          'main.userprofile': {
              'Meta': {'object_name': 'UserProfile'},
              'contributor': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
          },
          'main.vidlysubmission': {
              'Meta': {'object_name': 'VidlySubmission'},
              'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
              'event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['main.Event']"}),
              'hd': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'submission_error': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
              'submission_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 3, 30, 0, 0)'}),
              'tag': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
              'token_protection': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'url': ('django.db.models.fields.URLField', [], {'max_length': '200'})
          },
          'uploads.upload': {
              'Meta': {'object_name': 'Upload'},
              'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
              'file_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'mime_type': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
              'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
              'size': ('django.db.models.fields.IntegerField', [], {}),
              'suggested_event': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'suggested_event'", 'null': 'True', 'to': "orm['main.SuggestedEvent']"}),
              'url': ('django.db.models.fields.URLField', [], {'max_length': '400'}),
              'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
          }
      }
  
      complete_apps = ['main']