authentik.policies.migrations.0004_policy_execution_logging

 1# Generated by Django 3.1.4 on 2020-12-15 09:41
 2
 3from django.db import migrations, models
 4
 5
 6class Migration(migrations.Migration):
 7    dependencies = [
 8        ("authentik_policies", "0003_auto_20200908_1542"),
 9    ]
10
11    operations = [
12        migrations.AddField(
13            model_name="policy",
14            name="execution_logging",
15            field=models.BooleanField(
16                default=False,
17                help_text=(
18                    "When this option is enabled, all executions of this policy will be logged. By"
19                    " default, only execution errors are logged."
20                ),
21            ),
22        ),
23    ]
class Migration(django.db.migrations.migration.Migration):
 7class Migration(migrations.Migration):
 8    dependencies = [
 9        ("authentik_policies", "0003_auto_20200908_1542"),
10    ]
11
12    operations = [
13        migrations.AddField(
14            model_name="policy",
15            name="execution_logging",
16            field=models.BooleanField(
17                default=False,
18                help_text=(
19                    "When this option is enabled, all executions of this policy will be logged. By"
20                    " default, only execution errors are logged."
21                ),
22            ),
23        ),
24    ]

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', '0003_auto_20200908_1542')]
operations = [<AddField model_name='policy', name='execution_logging', field=<django.db.models.fields.BooleanField>>]