# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-19 16:14
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('turk', '0001_initial'),
        ('tasks', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='AnswerOption',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('text', models.CharField(max_length=255, verbose_name='Answer option')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='TaskAssignment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('correct_answer', models.IntegerField(null=True, verbose_name='Correct Answer')),
                ('user_answer', models.IntegerField(null=True, verbose_name='User Answer')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.RemoveField(
            model_name='task',
            name='answer_1',
        ),
        migrations.RemoveField(
            model_name='task',
            name='answer_2',
        ),
        migrations.RemoveField(
            model_name='task',
            name='correct_answer',
        ),
        migrations.RemoveField(
            model_name='task',
            name='time_answered',
        ),
        migrations.AddField(
            model_name='taskassignment',
            name='task',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assignments', to='tasks.Task'),
        ),
        migrations.AddField(
            model_name='taskassignment',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='turk.AmazonWorker'),
        ),
        migrations.AddField(
            model_name='task',
            name='answers',
            field=models.ManyToManyField(to='tasks.AnswerOption'),
        ),
    ]
