text: # encoding: 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 field 'Task.score_max'
          db.add_column('tasks_task', 'score_max', self.gf('django.db.models.fields.IntegerField')(default=0, db_index=True), keep_default=False)
  
          # Adding field 'TaskTaken.score'
          db.add_column('tasks_tasktaken', 'score', self.gf('django.db.models.fields.IntegerField')(default=0, max_length=1), keep_default=False)
  
          # Adding field 'TaskTaken.scored_by'
          db.add_column('tasks_tasktaken', 'scored_by', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='task_taken_scored_by_set', null=True, to=orm['auth.User']), keep_default=False)
  
  
      def backwards(self, orm):
          
          # Deleting field 'Task.score_max'
          db.delete_column('tasks_task', 'score_max')
  
          # Deleting field 'TaskTaken.score'
          db.delete_column('tasks_tasktaken', 'score')
  
          # Deleting field 'TaskTaken.scored_by'
          db.delete_column('tasks_tasktaken', 'scored_by_id')
  
  
      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(2012, 8, 3, 22, 13, 48, 518675)'}),
              '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(2012, 8, 3, 22, 13, 48, 518606)'}),
              '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'})
          },
          'courses.course': {
              'Meta': {'object_name': 'Course'},
              'added_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}),
              'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['groups.Group']", 'null': 'True', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'max_days_without_mark': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
              'max_users_per_task': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '256', 'db_index': 'True'}),
              'students': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'course_students_set'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['auth.User']"}),
              'take_policy': ('django.db.models.fields.IntegerField', [], {'default': '0', 'max_length': '1', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
              'teachers': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'course_teachers_set'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['auth.User']"}),
              'type': ('django.db.models.fields.IntegerField', [], {'default': '0', 'max_length': '1', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
              'update_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}),
              'year': ('django.db.models.fields.related.ForeignKey', [], {'default': '2012', 'to': "orm['years.Year']"})
          },
          'groups.group': {
              'Meta': {'unique_together': "(('year', 'name'),)", 'object_name': 'Group'},
              'added_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '256', 'blank': 'True'}),
              'students': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
              'update_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}),
              'year': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['years.Year']", 'blank': 'True'})
          },
          'tasks.task': {
              'Meta': {'object_name': 'Task'},
              'added_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}),
              'course': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['courses.Course']"}),
              'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['groups.Group']", 'db_index': 'False'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'score_max': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
              'task_text': ('django.db.models.fields.TextField', [], {}),
              'title': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '256', 'null': 'True', 'blank': 'True'}),
              'update_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'})
          },
          'tasks.tasktaken': {
              'Meta': {'unique_together': "(('user', 'task'),)", 'object_name': 'TaskTaken'},
              'added_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'score': ('django.db.models.fields.IntegerField', [], {'default': '0', 'max_length': '1'}),
              'scored_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'task_taken_scored_by_set'", 'null': 'True', 'to': "orm['auth.User']"}),
              'status': ('django.db.models.fields.IntegerField', [], {'default': '0', 'max_length': '1', 'db_index': 'True'}),
              'task': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['tasks.Task']"}),
              'update_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}),
              'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
          },
          'years.year': {
              'Meta': {'object_name': 'Year'},
              'added_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'start_year': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'db_index': 'True'}),
              'update_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'})
          }
      }
  
      complete_apps = ['tasks']
  