text: # -*- coding: utf-8 -*-
  from south.utils import datetime_utils as 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 'Avatar'
          db.delete_table(u'competition_avatar')
  
          # Deleting field 'Competition.avatar'
          db.delete_column(u'competition_competition', 'avatar_id')
  
          # Adding field 'Competition.image'
          db.add_column(u'competition_competition', 'image',
                        self.gf('django.db.models.fields.files.ImageField')(max_length=100, null=True, blank=True),
                        keep_default=False)
  
          # Deleting field 'Team.avatar'
          db.delete_column(u'competition_team', 'avatar_id')
  
  
      def backwards(self, orm):
          # Adding model 'Avatar'
          db.create_table(u'competition_avatar', (
              ('thumbnail', self.gf('django.db.models.fields.files.ImageField')(max_length=100)),
              ('thumbnail_height', self.gf('django.db.models.fields.IntegerField')()),
              ('image_width', self.gf('django.db.models.fields.IntegerField')()),
              ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
              ('image', self.gf('django.db.models.fields.files.ImageField')(max_length=100)),
              ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
              ('thumbnail_width', self.gf('django.db.models.fields.IntegerField')()),
              ('image_height', self.gf('django.db.models.fields.IntegerField')()),
          ))
          db.send_create_signal('competition', ['Avatar'])
  
          # Adding field 'Competition.avatar'
          db.add_column(u'competition_competition', 'avatar',
                        self.gf('django.db.models.fields.related.OneToOneField')(to=orm['competition.Avatar'], unique=True, null=True, blank=True),
                        keep_default=False)
  
          # Deleting field 'Competition.image'
          db.delete_column(u'competition_competition', 'image')
  
          # Adding field 'Team.avatar'
          db.add_column(u'competition_team', 'avatar',
                        self.gf('django.db.models.fields.related.OneToOneField')(to=orm['competition.Avatar'], unique=True, null=True, blank=True),
                        keep_default=False)
  
  
      models = {
          u'auth.group': {
              'Meta': {'object_name': 'Group'},
              u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
          },
          u'auth.permission': {
              'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
              'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
              'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
          },
          u'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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
              u'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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
              'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
          },
          'competition.competition': {
              'Meta': {'ordering': "['-is_running', '-is_open', '-start_time']", 'object_name': 'Competition'},
              'cost': ('django.db.models.fields.FloatField', [], {}),
              'description': ('django.db.models.fields.TextField', [], {}),
              'end_time': ('django.db.models.fields.DateTimeField', [], {}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
              'is_open': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'is_running': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'max_num_team_members': ('django.db.models.fields.IntegerField', [], {}),
              'min_num_team_members': ('django.db.models.fields.IntegerField', [], {}),
              'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}),
              'payment_option': ('django.db.models.fields.CharField', [], {'default': "'T'", 'max_length': '1'}),
              'questions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['competition.RegistrationQuestion']", 'null': 'True', 'blank': 'True'}),
              'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'blank': 'True'}),
              'start_time': ('django.db.models.fields.DateTimeField', [], {})
          },
          'competition.game': {
              'Meta': {'ordering': "['-game_id']", 'unique_together': "(('game_id', 'competition'),)", 'object_name': 'Game'},
              'competition': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['competition.Competition']"}),
              'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
              'end_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
              'extra_data': ('django.db.models.fields.TextField', [], {'default': "'null'", 'null': 'True'}),
              'game_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'start_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
              'status': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
              'teams': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['competition.Team']", 'through': "orm['competition.GameScore']", 'symmetrical': 'False'})
          },
          'competition.gamescore': {
              'Meta': {'object_name': 'GameScore'},
              'extra_data': ('django.db.models.fields.TextField', [], {'default': "'null'", 'null': 'True'}),
              'game': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'scores'", 'to': "orm['competition.Game']"}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'score': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
              'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['competition.Team']"})
          },
          'competition.invitation': {
              'Meta': {'ordering': "['-sent']", 'object_name': 'Invitation'},
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'message': ('django.db.models.fields.TextField', [], {}),
              'read': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'receiver': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'received_invitations'", 'to': u"orm['auth.User']"}),
              'response': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}),
              'sender': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sent_invitations'", 'to': u"orm['auth.User']"}),
              'sent': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
              'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['competition.Team']"})
          },
          'competition.organizer': {
              'Meta': {'object_name': 'Organizer'},
              'competition': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['competition.Competition']"}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'role': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['competition.OrganizerRole']", 'symmetrical': 'False'}),
              'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
          },
          'competition.organizerrole': {
              'Meta': {'object_name': 'OrganizerRole'},
              'description': ('django.db.models.fields.TextField', [], {}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
          },
          'competition.registration': {
              'Meta': {'object_name': 'Registration'},
              'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
              'competition': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['competition.Competition']"}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'signup_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
              'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
          },
          'competition.registrationquestion': {
              'Meta': {'object_name': 'RegistrationQuestion'},
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'question': ('django.db.models.fields.TextField', [], {}),
              'question_type': ('django.db.models.fields.CharField', [], {'max_length': '2'})
          },
          'competition.registrationquestionchoice': {
              'Meta': {'object_name': 'RegistrationQuestionChoice'},
              'choice': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'question_choice_set'", 'to': "orm['competition.RegistrationQuestion']"})
          },
          'competition.registrationquestionresponse': {
              'Meta': {'object_name': 'RegistrationQuestionResponse'},
              'agreed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'choices': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'response_set'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['competition.RegistrationQuestionChoice']"}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'response_set'", 'to': "orm['competition.RegistrationQuestion']"}),
              'registration': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'response_set'", 'to': "orm['competition.Registration']"}),
              'text_response': ('django.db.models.fields.TextField', [], {'blank': 'True'})
          },
          'competition.team': {
              'Meta': {'ordering': "['name']", 'unique_together': "(('competition', 'slug'),)", 'object_name': 'Team'},
              'competition': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['competition.Competition']"}),
              'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
              'eligible_to_win': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'members': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.User']", 'symmetrical': 'False'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
              'paid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'blank': 'True'}),
              'time_paid': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})
          },
          u'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'}),
              u'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'})
          }
      }
  
      complete_apps = ['competition']