# Generated by Django 3.0.7 on 2020-07-31 02:40

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='BrickPointType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('brick_class', models.CharField(max_length=150)),
            ],
        ),
        migrations.CreateModel(
            name='BrickVersion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('version', models.CharField(max_length=20, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='HaystackMarkerTag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tag', models.CharField(max_length=100)),
                ('namespace', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='HaystackPointType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('haystack_tagset', models.CharField(max_length=150)),
                ('tags', models.ManyToManyField(to='mapp.HaystackMarkerTag')),
            ],
        ),
        migrations.CreateModel(
            name='HaystackVersion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('version', models.CharField(max_length=20, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='InferenceVersion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('version', models.CharField(max_length=20, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='PointTypeMap',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('brick_point', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mapp.BrickPointType')),
                ('haystack_point', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mapp.HaystackPointType')),
                ('inference_version', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mapp.InferenceVersion')),
            ],
        ),
        migrations.AddField(
            model_name='haystackmarkertag',
            name='version',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mapp.HaystackVersion'),
        ),
        migrations.CreateModel(
            name='BrickTag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tag', models.CharField(max_length=100)),
                ('namespace', models.CharField(max_length=100)),
                ('version', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mapp.BrickVersion')),
            ],
            options={
                'unique_together': {('tag', 'version')},
            },
        ),
        migrations.AddField(
            model_name='brickpointtype',
            name='tags',
            field=models.ManyToManyField(to='mapp.BrickTag'),
        ),
        migrations.AlterUniqueTogether(
            name='haystackmarkertag',
            unique_together={('tag', 'version')},
        ),
    ]
