Plain is headed towards 1.0! Subscribe for development updates →

 1# Generated by Plain 0.17.0 on 2025-01-22 20:02
 2
 3import uuid
 4
 5import plain.api.models
 6from plain import models
 7from plain.models import migrations
 8
 9
10class Migration(migrations.Migration):
11    initial = True
12
13    dependencies = []
14
15    operations = [
16        migrations.CreateModel(
17            name="APIKey",
18            fields=[
19                ("id", models.BigAutoField(auto_created=True, primary_key=True)),
20                (
21                    "uuid",
22                    models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
23                ),
24                ("created_at", models.DateTimeField(auto_now_add=True)),
25                ("updated_at", models.DateTimeField(auto_now=True)),
26                ("last_used_at", models.DateTimeField(blank=True, null=True)),
27                ("name", models.CharField(blank=True, max_length=255)),
28                (
29                    "token",
30                    models.CharField(
31                        default=plain.api.models.generate_token,
32                        max_length=40,
33                        unique=True,
34                    ),
35                ),
36            ],
37        ),
38    ]