# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-11-06 12:38
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('annotator', '0027_uploadfile_file_type'),
    ]

    operations = [
        migrations.CreateModel(
            name='LabelMapping',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('num', models.IntegerField()),
            ],
        ),
        migrations.RemoveField(
            model_name='label',
            name='class_number',
        ),
        migrations.RemoveField(
            model_name='labelset',
            name='class_number',
        ),
        migrations.RemoveField(
            model_name='labelset',
            name='label',
        ),
        migrations.AlterField(
            model_name='label',
            name='color',
            field=models.CharField(default=annotator.models.random_color, max_length=6),
        ),
        migrations.AlterField(
            model_name='label',
            name='id',
            field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
        ),
        migrations.AlterField(
            model_name='labelset',
            name='id',
            field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
        ),
        migrations.AddField(
            model_name='labelmapping',
            name='label',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='annotator.Label'),
        ),
        migrations.AddField(
            model_name='labelmapping',
            name='labelset',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='annotator.Labelset'),
        ),
        migrations.AddField(
            model_name='labelset',
            name='labels',
            field=models.ManyToManyField(blank=True, through='annotator.LabelMapping', to='annotator.Label'),
        ),
    ]
