authentik.providers.proxy.migrations.0016_proxysession

 1# Generated by Django 5.2.7 on 2025-10-09 13:53
 2
 3import uuid
 4from django.db import migrations, models
 5
 6
 7class Migration(migrations.Migration):
 8
 9    dependencies = [
10        ("authentik_providers_proxy", "0015_proxyprovider_receive_header_auth"),
11    ]
12
13    operations = [
14        migrations.CreateModel(
15            name="ProxySession",
16            fields=[
17                ("expires", models.DateTimeField(default=None, null=True)),
18                ("expiring", models.BooleanField(default=True)),
19                ("uuid", models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
20                ("session_key", models.TextField(db_index=True, unique=True)),
21                ("user_id", models.UUIDField(blank=True, db_index=True, null=True)),
22                ("session_data", models.JSONField(blank=True, default=dict)),
23            ],
24            options={
25                "verbose_name": "Proxy Session",
26                "verbose_name_plural": "Proxy Sessions",
27                "indexes": [
28                    models.Index(fields=["user_id"], name="authentik_p_user_id_44328e_idx")
29                ],
30            },
31        ),
32    ]
class Migration(django.db.migrations.migration.Migration):
 8class Migration(migrations.Migration):
 9
10    dependencies = [
11        ("authentik_providers_proxy", "0015_proxyprovider_receive_header_auth"),
12    ]
13
14    operations = [
15        migrations.CreateModel(
16            name="ProxySession",
17            fields=[
18                ("expires", models.DateTimeField(default=None, null=True)),
19                ("expiring", models.BooleanField(default=True)),
20                ("uuid", models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
21                ("session_key", models.TextField(db_index=True, unique=True)),
22                ("user_id", models.UUIDField(blank=True, db_index=True, null=True)),
23                ("session_data", models.JSONField(blank=True, default=dict)),
24            ],
25            options={
26                "verbose_name": "Proxy Session",
27                "verbose_name_plural": "Proxy Sessions",
28                "indexes": [
29                    models.Index(fields=["user_id"], name="authentik_p_user_id_44328e_idx")
30                ],
31            },
32        ),
33    ]

The base class for all migrations.

Migration files will import this from django.db.migrations.Migration and subclass it as a class called Migration. It will have one or more of the following attributes:

  • operations: A list of Operation instances, probably from django.db.migrations.operations
  • dependencies: A list of tuples of (app_path, migration_name)
  • run_before: A list of tuples of (app_path, migration_name)
  • replaces: A list of migration_names

Note that all migrations come out of migrations and into the Loader or Graph as instances, having been initialized with their app label and name.

dependencies = [('authentik_providers_proxy', '0015_proxyprovider_receive_header_auth')]
operations = [<CreateModel name='ProxySession', fields=[('expires', <django.db.models.fields.DateTimeField>), ('expiring', <django.db.models.fields.BooleanField>), ('uuid', <django.db.models.fields.UUIDField>), ('session_key', <django.db.models.fields.TextField>), ('user_id', <django.db.models.fields.UUIDField>), ('session_data', <django.db.models.fields.json.JSONField>)], options={'verbose_name': 'Proxy Session', 'verbose_name_plural': 'Proxy Sessions', 'indexes': [<Index: fields=['user_id'] name='authentik_p_user_id_44328e_idx'>]}>]