# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-25 05:03
from __future__ import unicode_literals

import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='GameServer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ip', models.GenericIPAddressField(unpack_ipv4=True)),
                ('port', models.PositiveIntegerField(default=27015)),
                ('hostname', models.TextField(blank=True, max_length=200, null=True)),
                ('secret_key', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='LogTag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='ServerLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('kind', models.CharField(max_length=200)),
                ('data', django.contrib.postgres.fields.jsonb.JSONField()),
                ('time', models.DateTimeField(default=django.utils.timezone.now)),
                ('server', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='logs', to='stats.GameServer')),
                ('tags', models.ManyToManyField(to='stats.LogTag')),
            ],
        ),
    ]
