# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-01-15 21:16
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='Ip',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('address', models.CharField(max_length=50, unique=True)),
                ('visits', models.PositiveIntegerField(blank=True, default=0)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Path',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('path', models.CharField(max_length=400, unique=True)),
                ('visits', models.PositiveIntegerField(blank=True, default=0)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='UserAgent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('string', models.TextField(unique=True)),
                ('visits', models.PositiveIntegerField(blank=True, default=0)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Visit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('method', models.CharField(blank=True, max_length=10)),
                ('content_type', models.CharField(blank=True, max_length=256)),
                ('encoding', models.CharField(blank=True, max_length=265)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('ip', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ct_useragents.Ip')),
                ('path', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ct_useragents.Path')),
                ('useragent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ct_useragents.UserAgent')),
            ],
        ),
    ]
