# Generated by Django 4.0.4 on 2022-05-15 11:59

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


class Migration(migrations.Migration):

    dependencies = [
        ('labeltree', '0002_alter_label_unique_together_alter_label_kr_nr_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='LabelGroup',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created at')),
                ('last_update', models.DateTimeField(auto_now=True, verbose_name='Last modified at')),
                ('name', models.CharField(max_length=255, verbose_name='Group name')),
                ('parent', models.ForeignKey(blank=True, limit_choices_to={'taxonomic_rank': 'genus'}, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='child_groups', to='labeltree.label', verbose_name='Parent')),
                ('species', models.ManyToManyField(limit_choices_to={'taxonomic_rank': 'species'}, related_name='group', to='labeltree.label')),
            ],
            options={
                'verbose_name': 'Label Group',
                'verbose_name_plural': 'Label Groups',
            },
        ),
    ]
