# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
import django_extensions.db.fields
from django.conf import settings


class Migration(migrations.Migration):

    dependencies = [
        ('challenges', '0002_remove_challenge_questions'),
        ('sync', '0001_initial'),
        ('contenttypes', '0002_remove_content_type_name'),
        ('trainings', '0018_trainingactivity'),
        ('assessments', '0010_fix_comp_dim_cardinality'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('evaluations', '0003_auto_20150819_1759'),
        ('workshops', '0015_auto_20150728_1800'),
    ]

    operations = [
        migrations.CreateModel(
            name='WorkshopStepImage',
            fields=[
                ('workshopstep_ptr', models.OneToOneField(primary_key=True, serialize=False, auto_created=True, parent_link=True, to='workshops.WorkshopStep')),
                ('image', models.ImageField(upload_to='workshops', verbose_name='Image')),
            ],
            options={
                'abstract': False,
            },
            bases=('workshops.workshopstep',),
        ),
        migrations.CreateModel(
            name='WorkshopStepQuestion',
            fields=[
                ('workshopstep_ptr', models.OneToOneField(primary_key=True, serialize=False, auto_created=True, parent_link=True, to='workshops.WorkshopStep')),
                ('is_assessing', models.BooleanField(default=False, verbose_name='assessing')),
                ('activity_id', django_extensions.db.fields.UUIDField(blank=True, editable=False, null=True)),
                ('is_multiple_choices', models.BooleanField(default=False)),
                ('is_answers_order_random', models.BooleanField(default=False, verbose_name='randomize the answers order')),
                ('activity_type', models.ForeignKey(null=True, blank=True, to='contenttypes.ContentType')),
                ('dimensions', models.ManyToManyField(blank=True, to='assessments.Dimension')),
                ('training', models.ForeignKey(null=True, blank=True, to='trainings.Training')),
            ],
            options={
                'abstract': False,
            },
            bases=('workshops.workshopstep', models.Model),
        ),
        migrations.CreateModel(
            name='WorkshopStepQuestionAnswer',
            fields=[
                ('sort_order', models.IntegerField(db_index=True, blank=True)),
                ('id', django_extensions.db.fields.UUIDField(primary_key=True, blank=True, editable=False, serialize=False)),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('label', models.CharField(max_length=500, verbose_name='answer')),
                ('color', models.CharField(null=True, max_length=50, blank=True, verbose_name='color')),
                ('is_correct', models.BooleanField(default=False, verbose_name='correct')),
                ('points', models.IntegerField(default=0)),
                ('first_update', models.ForeignKey(related_name='workshopstepquestionanswer_by_first', null=True, blank=True, to='sync.Update')),
                ('last_update', models.ForeignKey(related_name='workshopstepquestionanswer_by_last', null=True, blank=True, to='sync.Update')),
                ('original_version', models.ForeignKey(null=True, related_name='all_duplicates', to='workshops.WorkshopStepQuestionAnswer')),
                ('parent_version', models.ForeignKey(null=True, related_name='direct_duplicates', to='workshops.WorkshopStepQuestionAnswer')),
                ('question', models.ForeignKey(related_name='answers', to='workshops.WorkshopStepQuestion')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='WorkshopStepQuestionUserAnswer',
            fields=[
                ('id', django_extensions.db.fields.UUIDField(primary_key=True, blank=True, editable=False, serialize=False)),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('text', models.TextField()),
                ('answer', models.ForeignKey(null=True, to='workshops.WorkshopStepQuestionAnswer')),
                ('first_update', models.ForeignKey(related_name='workshopstepquestionuseranswer_by_first', null=True, blank=True, to='sync.Update')),
                ('last_update', models.ForeignKey(related_name='workshopstepquestionuseranswer_by_last', null=True, blank=True, to='sync.Update')),
                ('question', models.ForeignKey(to='workshops.WorkshopStepQuestion')),
                ('training_session', models.ForeignKey(to='trainings.TrainingSession')),
                ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.RemoveField(
            model_name='workshopimage',
            name='img',
        ),
        migrations.RemoveField(
            model_name='workshopimage',
            name='workshopstep_ptr',
        ),
        migrations.AlterUniqueTogether(
            name='workshopproperties',
            unique_together=set([]),
        ),
        migrations.RemoveField(
            model_name='workshopproperties',
            name='first_update',
        ),
        migrations.RemoveField(
            model_name='workshopproperties',
            name='last_update',
        ),
        migrations.RemoveField(
            model_name='workshopproperties',
            name='mgroups',
        ),
        migrations.RemoveField(
            model_name='workshopproperties',
            name='original',
        ),
        migrations.RemoveField(
            model_name='workshopproperties',
            name='user',
        ),
        migrations.RemoveField(
            model_name='workshopproperties',
            name='workshop',
        ),
        migrations.RemoveField(
            model_name='workshopquestion',
            name='activity_type',
        ),
        migrations.RemoveField(
            model_name='workshopquestion',
            name='dimensions',
        ),
        migrations.RemoveField(
            model_name='workshopquestion',
            name='description',
        ),
        migrations.RemoveField(
            model_name='workshopquestion',
            name='training',
        ),
        migrations.RemoveField(
            model_name='workshopquestion',
            name='workshopstep_ptr',
        ),
        migrations.RemoveField(
            model_name='workshopquestionanswer',
            name='first_update',
        ),
        migrations.RemoveField(
            model_name='workshopquestionanswer',
            name='last_update',
        ),
        migrations.RemoveField(
            model_name='workshopquestionanswer',
            name='original',
        ),
        migrations.RemoveField(
            model_name='workshopquestionanswer',
            name='question',
        ),
        migrations.RemoveField(
            model_name='workshopquestionuseranswer',
            name='answer',
        ),
        migrations.RemoveField(
            model_name='workshopquestionuseranswer',
            name='first_update',
        ),
        migrations.RemoveField(
            model_name='workshopquestionuseranswer',
            name='last_update',
        ),
        migrations.RemoveField(
            model_name='workshopquestionuseranswer',
            name='question',
        ),
        migrations.RemoveField(
            model_name='workshopquestionuseranswer',
            name='training_session',
        ),
        migrations.RemoveField(
            model_name='workshopquestionuseranswer',
            name='user',
        ),
        migrations.RemoveField(
            model_name='workshoptext',
            name='workshopstep_ptr',
        ),
        migrations.AlterModelOptions(
            name='workshopstep',
            options={},
        ),
        migrations.RemoveField(
            model_name='workshop',
            name='first_update',
        ),
        migrations.RemoveField(
            model_name='workshop',
            name='id',
        ),
        migrations.RemoveField(
            model_name='workshop',
            name='is_assessing',
        ),
        migrations.RemoveField(
            model_name='workshop',
            name='is_deleted',
        ),
        migrations.RemoveField(
            model_name='workshop',
            name='last_update',
        ),
        migrations.RemoveField(
            model_name='workshop',
            name='original',
        ),
        migrations.RemoveField(
            model_name='workshop',
            name='preview',
        ),
        migrations.RemoveField(
            model_name='workshop',
            name='training',
        ),
        migrations.RemoveField(
            model_name='workshop',
            name='update_locally',
        ),
        migrations.RemoveField(
            model_name='workshop',
            name='weight',
        ),
        migrations.RemoveField(
            model_name='workshopstep',
            name='order',
        ),
        migrations.RemoveField(
            model_name='workshopstep',
            name='original',
        ),
        migrations.RemoveField(
            model_name='workshopstep',
            name='type',
        ),
        migrations.AddField(
            model_name='workshop',
            name='are_questions_mandatory',
            field=models.BooleanField(help_text='Does the questions must be mandatory ?', verbose_name='questions are mandatory', default=False),
        ),
        migrations.AddField(
            model_name='workshop',
            name='enable_score',
            field=models.BooleanField(default=False, verbose_name='with score'),
        ),
        migrations.AddField(
            model_name='workshop',
            name='is_broadcastable',
            field=models.BooleanField(default=False, verbose_name='broadcastable'),
        ),
        migrations.AddField(
            model_name='workshop',
            name='is_questions_answers_order_random',
            field=models.BooleanField(default=False, verbose_name='randomize the questions answers order'),
        ),
        migrations.AddField(
            model_name='workshop',
            name='is_steps_order_random',
            field=models.BooleanField(default=False, verbose_name='randomize the steps order'),
        ),
        migrations.AddField(
            model_name='workshop',
            name='needs_approval',
            field=models.BooleanField(help_text='Does the workshop needs a trainer approval to be started ?', verbose_name='needs trainer approval', default=False),
        ),
        migrations.AddField(
            model_name='workshop',
            name='trainingactivity_ptr',
            field=models.OneToOneField(primary_key=True, default='', serialize=False, auto_created=True, parent_link=True, to='trainings.TrainingActivity'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='workshopstep',
            name='description',
            field=models.CharField(max_length=500, blank=True),
        ),
        migrations.AddField(
            model_name='workshopstep',
            name='original_version',
            field=models.ForeignKey(null=True, related_name='all_duplicates', to='workshops.WorkshopStep'),
        ),
        migrations.AddField(
            model_name='workshopstep',
            name='parent_version',
            field=models.ForeignKey(null=True, related_name='direct_duplicates', to='workshops.WorkshopStep'),
        ),
        migrations.AddField(
            model_name='workshopstep',
            name='polymorphic_ctype',
            field=models.ForeignKey(null=True, related_name='polymorphic_workshops.workshopstep_set+', editable=False, to='contenttypes.ContentType'),
        ),
        migrations.AddField(
            model_name='workshopstep',
            name='sort_order',
            field=models.IntegerField(default=0, blank=True, db_index=True),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='workshopstep',
            name='workshop',
            field=models.ForeignKey(related_name='steps', to='workshops.Workshop'),
        ),
        migrations.DeleteModel(
            name='WorkshopImage',
        ),
        migrations.DeleteModel(
            name='WorkshopProperties',
        ),
        migrations.DeleteModel(
            name='WorkshopQuestion',
        ),
        migrations.DeleteModel(
            name='WorkshopQuestionAnswer',
        ),
        migrations.DeleteModel(
            name='WorkshopQuestionUserAnswer',
        ),
        migrations.DeleteModel(
            name='WorkshopText',
        ),
    ]
