# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-04 22:24
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='UserAudit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('audit_key', models.CharField(db_index=True, max_length=255, unique=True)),
                ('ip_address', models.GenericIPAddressField(blank=True, null=True)),
                ('referrer', models.CharField(max_length=255)),
                ('user_agent', models.CharField(max_length=255)),
                ('last_page', models.CharField(max_length=255)),
                ('pages_viwed', models.PositiveIntegerField(default=0)),
                ('force_logout', models.BooleanField(default=False)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='useraudit', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='useraudit',
            unique_together=set([('user', 'audit_key')]),
        ),
    ]
