# Generated by Django 2.0.6 on 2018-06-09 15:32

from django.conf import settings
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Node',
            fields=[
                ('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
                ('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField()),
                ('node_type', models.CharField(choices=[('recording', 'recording'), ('processing', 'processing')], max_length=20)),
                ('description', models.TextField(blank=True, null=True)),
                ('latitude', models.DecimalField(blank=True, decimal_places=11, max_digits=14, null=True)),
                ('longitude', models.DecimalField(blank=True, decimal_places=11, max_digits=14, null=True)),
                ('altitude', models.DecimalField(blank=True, decimal_places=3, max_digits=7, null=True)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('name',),
            },
        ),
        migrations.CreateModel(
            name='Status',
            fields=[
                ('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
                ('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('status_code', models.CharField(choices=[('OK', 'OK'), ('maintenance', 'maintenance'), ('working', 'working')], max_length=20)),
                ('node_time_utc', models.DateTimeField()),
                ('data', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
                ('node', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nodes.Node')),
            ],
            options={
                'verbose_name_plural': 'Status',
            },
        ),
    ]
