# Generated by Django 2.0.9 on 2020-03-14 07:36

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.CharField(db_index=True, max_length=255, verbose_name='Text')),
            ],
            options={
                'verbose_name': 'Tag',
                'verbose_name_plural': 'Tags',
            },
        ),
        migrations.CreateModel(
            name='TagGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True, verbose_name='Text')),
            ],
            options={
                'verbose_name': 'Tag group',
                'verbose_name_plural': 'Tag groups',
                'ordering': ('name',),
            },
        ),
        migrations.AddField(
            model_name='tag',
            name='group',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='tags', to='tags.TagGroup', verbose_name='Group'),
        ),
        migrations.AlterUniqueTogether(
            name='tag',
            unique_together={('group', 'text')},
        ),
    ]
