# Generated by Django 2.0.4 on 2018-10-10 19:00

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


class Migration(migrations.Migration):

    dependencies = [
        ('panels', '0004_auto_20180905_2049'),
    ]

    operations = [
        migrations.CreateModel(
            name='Placemark',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, unique=True)),
                ('description', models.CharField(blank=True, max_length=256, null=True)),
                ('x', models.FloatField()),
                ('y', models.FloatField()),
                ('coordinates_type', models.CharField(choices=[('G', 'Geographical (lat,lon)'), ('C', 'Cartesian Coordinates (x,y)')], max_length=1)),
            ],
        ),
        migrations.CreateModel(
            name='PlacemarkGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, unique=True)),
                ('description', models.CharField(blank=True, max_length=256, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='PlacemarkType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, unique=True)),
            ],
        ),
        migrations.AlterField(
            model_name='alarmconfig',
            name='alarm_id',
            field=models.CharField(max_length=64, unique=True),
        ),
        migrations.AlterField(
            model_name='alarmconfig',
            name='placemark',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='alarm', to='panels.Placemark'),
        ),
        migrations.AlterField(
            model_name='type',
            name='name',
            field=models.CharField(max_length=15, unique=True),
        ),
        migrations.AlterField(
            model_name='view',
            name='name',
            field=models.CharField(max_length=15, unique=True),
        ),
        migrations.AddField(
            model_name='placemark',
            name='group',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='placemarks', to='panels.PlacemarkGroup'),
        ),
        migrations.AddField(
            model_name='placemark',
            name='type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='placemarks', to='panels.PlacemarkType'),
        ),
    ]
