# Generated by Django 3.0.7 on 2020-07-31 04:09

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


from mapp.resources.migration_utils import generate_brick_point_classes


def generate_brick_point_classes_migration(apps, schema_editor):
    bv = '1.1'
    generate_brick_point_classes(bv)


class Migration(migrations.Migration):

    dependencies = [
        ('mapp', '0004_auto_20200731_0309'),
    ]

    operations = [
        migrations.AddField(
            model_name='brickpointtype',
            name='version',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mapp.BrickVersion'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='haystackpointtype',
            name='version',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mapp.HaystackVersion'),
            preserve_default=False,
        ),
        migrations.CreateModel(
            name='HaystackEquipmentType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('haystack_tagset', models.CharField(max_length=150)),
                ('marker_tags', models.ManyToManyField(to='mapp.HaystackMarkerTag')),
                ('version', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mapp.HaystackVersion')),
            ],
        ),
        migrations.CreateModel(
            name='BrickEquipmentType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('brick_class', models.CharField(max_length=150)),
                ('tags', models.ManyToManyField(to='mapp.BrickTag')),
                ('version', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mapp.BrickVersion')),
            ],
        ),
        migrations.AddField(
            model_name='pointtypemap',
            name='brick_version',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mapp.BrickVersion'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='pointtypemap',
            name='haystack_version',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mapp.HaystackVersion'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='pointtypemap',
            name='brick_point',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='mapp.BrickPointType'),
        ),
        migrations.AlterField(
            model_name='pointtypemap',
            name='haystack_point',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='mapp.HaystackPointType'),
        ),
        migrations.RunPython(generate_brick_point_classes_migration)
    ]

# Generated by Django 3.0.7 on 2020-07-31 04:09

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


from mapp.resources.migration_utils import generate_brick_point_classes


def generate_brick_point_classes_migration(apps, schema_editor):
    bv = '1.1'
    generate_brick_point_classes(bv)


class Migration(migrations.Migration):

    dependencies = [
        ('mapp', '0004_auto_20200731_0309'),
    ]

    operations = [
        migrations.AddField(
            model_name='brickpointtype',
            name='version',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mapp.BrickVersion'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='haystackpointtype',
            name='version',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mapp.HaystackVersion'),
            preserve_default=False,
        ),
        migrations.CreateModel(
            name='HaystackEquipmentType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('haystack_tagset', models.CharField(max_length=150)),
                ('marker_tags', models.ManyToManyField(to='mapp.HaystackMarkerTag')),
                ('version', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mapp.HaystackVersion')),
            ],
        ),
        migrations.CreateModel(
            name='BrickEquipmentType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('brick_class', models.CharField(max_length=150)),
                ('tags', models.ManyToManyField(to='mapp.BrickTag')),
                ('version', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mapp.BrickVersion')),
            ],
        ),
        migrations.AddField(
            model_name='pointtypemap',
            name='brick_version',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mapp.BrickVersion'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='pointtypemap',
            name='haystack_version',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mapp.HaystackVersion'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='pointtypemap',
            name='brick_point',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='mapp.BrickPointType'),
        ),
        migrations.AlterField(
            model_name='pointtypemap',
            name='haystack_point',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='mapp.HaystackPointType'),
        ),
        migrations.RunPython(generate_brick_point_classes_migration)
    ]

# Generated by Django 3.0.7 on 2020-07-31 04:09