authentik.events.migrations.0007_event_authentik_e_action_9a9dd9_idx_and_more

 1# Generated by Django 5.0.4 on 2024-04-15 16:17
 2
 3from django.db import migrations, models
 4
 5
 6class Migration(migrations.Migration):
 7
 8    dependencies = [
 9        ("authentik_events", "0006_alter_systemtask_expires"),
10    ]
11
12    operations = [
13        migrations.AddIndex(
14            model_name="event",
15            index=models.Index(fields=["action"], name="authentik_e_action_9a9dd9_idx"),
16        ),
17        migrations.AddIndex(
18            model_name="event",
19            index=models.Index(fields=["user"], name="authentik_e_user_1be48d_idx"),
20        ),
21        migrations.AddIndex(
22            model_name="event",
23            index=models.Index(fields=["app"], name="authentik_e_app_6a05ce_idx"),
24        ),
25        migrations.AddIndex(
26            model_name="event",
27            index=models.Index(fields=["created"], name="authentik_e_created_6f0834_idx"),
28        ),
29        migrations.AddIndex(
30            model_name="event",
31            index=models.Index(fields=["client_ip"], name="authentik_e_client__51f4dd_idx"),
32        ),
33        migrations.AddIndex(
34            model_name="event",
35            index=models.Index(
36                models.F("context__authorized_application"), name="authentik_e_ctx_app__idx"
37            ),
38        ),
39    ]
class Migration(django.db.migrations.migration.Migration):
 7class Migration(migrations.Migration):
 8
 9    dependencies = [
10        ("authentik_events", "0006_alter_systemtask_expires"),
11    ]
12
13    operations = [
14        migrations.AddIndex(
15            model_name="event",
16            index=models.Index(fields=["action"], name="authentik_e_action_9a9dd9_idx"),
17        ),
18        migrations.AddIndex(
19            model_name="event",
20            index=models.Index(fields=["user"], name="authentik_e_user_1be48d_idx"),
21        ),
22        migrations.AddIndex(
23            model_name="event",
24            index=models.Index(fields=["app"], name="authentik_e_app_6a05ce_idx"),
25        ),
26        migrations.AddIndex(
27            model_name="event",
28            index=models.Index(fields=["created"], name="authentik_e_created_6f0834_idx"),
29        ),
30        migrations.AddIndex(
31            model_name="event",
32            index=models.Index(fields=["client_ip"], name="authentik_e_client__51f4dd_idx"),
33        ),
34        migrations.AddIndex(
35            model_name="event",
36            index=models.Index(
37                models.F("context__authorized_application"), name="authentik_e_ctx_app__idx"
38            ),
39        ),
40    ]

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_events', '0006_alter_systemtask_expires')]
operations = [<AddIndex model_name='event', index=<Index: fields=['action'] name='authentik_e_action_9a9dd9_idx'>>, <AddIndex model_name='event', index=<Index: fields=['user'] name='authentik_e_user_1be48d_idx'>>, <AddIndex model_name='event', index=<Index: fields=['app'] name='authentik_e_app_6a05ce_idx'>>, <AddIndex model_name='event', index=<Index: fields=['created'] name='authentik_e_created_6f0834_idx'>>, <AddIndex model_name='event', index=<Index: fields=['client_ip'] name='authentik_e_client__51f4dd_idx'>>, <AddIndex model_name='event', index=<Index: expressions=(F(context__authorized_application),) name='authentik_e_ctx_app__idx'>>]