# Generated by Django 5.2.8 on 2025-11-11 09:46

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('tokens', '0002_delete_legacy_tokens'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='SODARAuthToken',
            fields=[
                (
                    'digest',
                    models.CharField(
                        max_length=128, primary_key=True, serialize=False
                    ),
                ),
                ('token_key', models.CharField(db_index=True, max_length=25)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('expiry', models.DateTimeField(blank=True, null=True)),
                (
                    'sodar_label',
                    models.CharField(
                        max_length=256,
                        blank=True,
                        help_text='Optional label for token',
                    ),
                ),
                (
                    'user',
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name='auth_token_set',
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                'swappable': 'KNOX_TOKEN_MODEL',
            },
        ),
    ]
