# Generated by Django 1.11.9 on 2018-04-16 14:00
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models

import django_fido.models


class Migration(migrations.Migration):
    initial = True

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

    operations = [
        migrations.CreateModel(
            name="U2fDevice",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("create_datetime", models.DateTimeField(auto_now_add=True)),
                ("version", models.TextField()),
                ("key_handle", models.TextField()),
                ("public_key", models.TextField()),
                ("app_id", models.TextField(blank=True, default=None, null=True)),
                (
                    "raw_transports",
                    models.TextField(
                        blank=True, default=None, null=True, validators=[django_fido.models.TransportsValidator()]
                    ),
                ),
                ("counter", models.PositiveIntegerField(default=0)),
                (
                    "user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="u2f_devices",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
        ),
    ]
