# Generated by Django 2.1.2 on 2019-03-26 11:13

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

migrate_join_table_data = """
INSERT INTO info_tasksheet_x_task (task_id,sheet_id)
  SELECT task_id, tasksheet_id
  FROM info_tasksheet_tasks
"""


class Migration(migrations.Migration):
    dependencies = [
        ('data', '0029_auto_20190205_1818'),
        ('info', '0019_auto_20181210_2242'),
    ]

    operations = [
        migrations.CreateModel(
            name='TaskSheetTask',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sheet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='info.TaskSheet')),
                ('task', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='data.Task')),
            ],
            options={
                'db_table': 'info_tasksheet_x_task',
            },
        ),
        migrations.AlterUniqueTogether(
            name='tasksheettask',
            unique_together={('task', 'sheet')},
        ),
        migrations.RunSQL(migrate_join_table_data),
    ]
