mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-26 14:10:20 +00:00
29 lines
968 B
Python
29 lines
968 B
Python
# Generated by Django 4.2.11 on 2024-04-25 04:19
|
|
|
|
import api.models
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import uuid
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='APIToken',
|
|
fields=[
|
|
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
|
('token', models.CharField(default=api.models.generate_secret_token, max_length=32, unique=True)),
|
|
('created', models.DateTimeField(auto_now_add=True)),
|
|
('expires', models.DateTimeField(blank=True, null=True)),
|
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
|
],
|
|
),
|
|
]
|