# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-08-05 09:48
from __future__ import unicode_literals

import c3nav.mapdata.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('mapdata', '0029_auto_20170714_1519'),
    ]

    operations = [
        migrations.CreateModel(
            name='AltitudeArea',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('geometry', c3nav.mapdata.fields.GeometryField(default=None, geomtype='polygon')),
                ('altitude', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='altitude')),
            ],
            options={
                'verbose_name': 'Altitude Area',
                'verbose_name_plural': 'Altitude Areas',
                'default_related_name': 'altitudeareas',
            },
        ),
        migrations.CreateModel(
            name='AltitudeMarker',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('geometry', c3nav.mapdata.fields.GeometryField(default=None, geomtype='point')),
                ('altitude', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='altitude')),
                ('space', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='altitudemarkers', to='mapdata.Space', verbose_name='space')),
            ],
            options={
                'verbose_name': 'Altitude Marker',
                'verbose_name_plural': 'Altitude Markers',
                'default_related_name': 'altitudemarkers',
            },
        ),
        migrations.AlterModelOptions(
            name='level',
            options={'ordering': ['ordering'], 'verbose_name': 'Level', 'verbose_name_plural': 'Levels'},
        ),
        migrations.RenameField(
            model_name='level',
            old_name='altitude',
            new_name='ordering',
        ),
        migrations.AlterField(
            model_name='level',
            name='ordering',
            field=models.DecimalField(decimal_places=2, max_digits=6, unique=True, verbose_name='ordering'),
        ),
        migrations.AddField(
            model_name='altitudearea',
            name='level',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='altitudeareas', to='mapdata.Level', verbose_name='level'),
        ),
    ]
