# Generated by Django 2.1.7 on 2019-03-25 06:01

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='DefinitionLevel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.CharField(max_length=512)),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='alignment_tags.DefinitionLevel')),
            ],
        ),
        migrations.CreateModel(
            name='DefinitionLevelType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=512, unique=True)),
                ('is_internal', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=255, unique=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('parent_level', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alignment_tags.DefinitionLevel')),
            ],
        ),
        migrations.AddField(
            model_name='definitionlevel',
            name='type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alignment_tags.DefinitionLevelType'),
        ),
        migrations.AlterUniqueTogether(
            name='definitionlevel',
            unique_together={('value', 'parent')},
        ),
    ]
