# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-07 20:50
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('density', models.DecimalField(decimal_places=0, help_text='Count of IPV6 addresses at this location.', max_digits=39)),
                ('latitude', models.DecimalField(decimal_places=6, max_digits=9)),
                ('longitude', models.DecimalField(decimal_places=6, max_digits=9)),
            ],
        ),
        migrations.CreateModel(
            name='Version',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('publish_date', models.DateField(help_text='Date the data was published by the source.')),
                ('is_active', models.BooleanField(default=False)),
            ],
            options={
                'ordering': ['-publish_date', '-id'],
            },
        ),
        migrations.AddField(
            model_name='location',
            name='version',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='geodata.Version'),
        ),
        migrations.AlterUniqueTogether(
            name='location',
            unique_together=set([('version', 'latitude', 'longitude')]),
        ),
    ]
