# -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-03-21 08:41


from django.db import migrations, models
import django.utils.timezone
import seahub.base.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Token',
            fields=[
                ('key', models.CharField(max_length=40, primary_key=True, serialize=False)),
                ('user', seahub.base.fields.LowerCaseCharField(max_length=255, unique=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='TokenV2',
            fields=[
                ('key', models.CharField(max_length=40, primary_key=True, serialize=False)),
                ('user', seahub.base.fields.LowerCaseCharField(max_length=255)),
                ('platform', seahub.base.fields.LowerCaseCharField(max_length=32)),
                ('device_id', models.CharField(max_length=40)),
                ('device_name', models.CharField(max_length=40)),
                ('platform_version', seahub.base.fields.LowerCaseCharField(max_length=16)),
                ('client_version', seahub.base.fields.LowerCaseCharField(max_length=16)),
                ('last_accessed', models.DateTimeField(auto_now=True)),
                ('last_login_ip', models.GenericIPAddressField(default=None, null=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('wiped_at', models.DateTimeField(null=True)),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='tokenv2',
            unique_together={('user', 'platform', 'device_id')},
        ),
    ]
