authentik.policies.reputation.migrations.0004_reputationpolicy_authentik_p_policy__8f0d70_idx

 1# Generated by Django 4.1.2 on 2022-10-19 19:24
 2
 3from django.db import migrations, models
 4
 5
 6class Migration(migrations.Migration):
 7    dependencies = [
 8        (
 9            "authentik_policies_reputation",
10            "0003_reputation_delete_ipreputation_delete_userreputation",
11        ),
12    ]
13
14    operations = [
15        migrations.AddIndex(
16            model_name="reputationpolicy",
17            index=models.Index(fields=["policy_ptr_id"], name="authentik_p_policy__8f0d70_idx"),
18        ),
19    ]
class Migration(django.db.migrations.migration.Migration):
 7class Migration(migrations.Migration):
 8    dependencies = [
 9        (
10            "authentik_policies_reputation",
11            "0003_reputation_delete_ipreputation_delete_userreputation",
12        ),
13    ]
14
15    operations = [
16        migrations.AddIndex(
17            model_name="reputationpolicy",
18            index=models.Index(fields=["policy_ptr_id"], name="authentik_p_policy__8f0d70_idx"),
19        ),
20    ]

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_policies_reputation', '0003_reputation_delete_ipreputation_delete_userreputation')]
operations = [<AddIndex model_name='reputationpolicy', index=<Index: fields=['policy_ptr_id'] name='authentik_p_policy__8f0d70_idx'>>]