65 lines
2 KiB
Python
65 lines
2 KiB
Python
|
# Generated by Django 5.0 on 2023-12-19 20:19
|
||
|
|
||
|
import django.db.models.deletion
|
||
|
import uuid
|
||
|
from django.conf import settings
|
||
|
from django.db import migrations, models
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
dependencies = [
|
||
|
("authentication", "0002_alter_totpsecret_user"),
|
||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name="AppKey",
|
||
|
fields=[
|
||
|
(
|
||
|
"id",
|
||
|
models.UUIDField(
|
||
|
default=uuid.uuid4,
|
||
|
editable=False,
|
||
|
primary_key=True,
|
||
|
serialize=False,
|
||
|
),
|
||
|
),
|
||
|
("device", models.CharField(max_length=255)),
|
||
|
("key", models.TextField()),
|
||
|
("active", models.BooleanField(default=True)),
|
||
|
(
|
||
|
"user",
|
||
|
models.ForeignKey(
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
to=settings.AUTH_USER_MODEL,
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name="AppSession",
|
||
|
fields=[
|
||
|
(
|
||
|
"id",
|
||
|
models.UUIDField(
|
||
|
default=uuid.uuid4,
|
||
|
editable=False,
|
||
|
primary_key=True,
|
||
|
serialize=False,
|
||
|
),
|
||
|
),
|
||
|
("created", models.DateTimeField(auto_now_add=True)),
|
||
|
("used", models.DateTimeField(blank=True, null=True)),
|
||
|
("approved", models.BooleanField(default=False)),
|
||
|
(
|
||
|
"user",
|
||
|
models.ForeignKey(
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
to=settings.AUTH_USER_MODEL,
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
]
|