# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-04 14:14
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('exercises', '0005_auto_20171004_1614'),
        ('tasks', '0002_auto_20171004_1512'),
    ]

    operations = [
        migrations.CreateModel(
            name='ExerciseTaskPosition',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.PositiveIntegerField(blank=True, default=0, verbose_name='pozycja')),
                ('exercise', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='exercise_task_positions', to='exercises.Exercise', verbose_name='cwiczenie')),
                ('task', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='exercise_task_positions', to='tasks.Task', verbose_name='zadanie')),
            ],
            options={
                'verbose_name': 'ćwiczenie w zadaniu',
                'verbose_name_plural': 'ćwiczenia w zadaniach',
                'ordering': ('position',),
            },
        ),
        migrations.AddField(
            model_name='task',
            name='exercises',
            field=models.ManyToManyField(blank=True, related_name='tasks', through='tasks.ExerciseTaskPosition', to='exercises.Exercise', verbose_name='ćwiczenia'),
        ),
    ]
