# SPDX-License-Identifier: AGPL-3.0-or-later

#
# Generated by Django 4.2.28 on 2026-03-19 23:52
#
"""
Django migration for adding the user's passkey model.
"""

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('plinth', '0005_storednotification'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserPasskey',
            fields=[
                ('id',
                 models.AutoField(auto_created=True, primary_key=True,
                                  serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256, null=True,
                                          blank=True)),
                ('domain', models.CharField(max_length=256)),
                ('created_time', models.DateTimeField(auto_now_add=True)),
                ('last_used_time', models.DateTimeField(auto_now=True)),
                ('signature_counter', models.IntegerField(default=0)),
                ('registration_flags', models.IntegerField()),
                ('extensions', models.JSONField(null=True, blank=True)),
                ('aaguid', models.UUIDField(null=True, blank=True)),
                ('credential_id', models.BinaryField(unique=True)),
                ('public_key', models.BinaryField()),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='passkeys',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
