authentik.events.migrations.0002_alter_notificationtransport_mode

 1# Generated by Django 4.0.4 on 2022-05-30 18:08
 2from django.db import migrations, models
 3
 4
 5class Migration(migrations.Migration):
 6    dependencies = [
 7        ("authentik_events", "0001_squashed_0019_alter_notificationtransport_webhook_url"),
 8    ]
 9
10    operations = [
11        migrations.AlterField(
12            model_name="notificationtransport",
13            name="mode",
14            field=models.TextField(
15                choices=[
16                    ("local", "authentik inbuilt notifications"),
17                    ("webhook", "Generic Webhook"),
18                    ("webhook_slack", "Slack Webhook (Slack/Discord)"),
19                    ("email", "Email"),
20                ],
21                default="local",
22            ),
23        ),
24        migrations.AlterModelOptions(
25            name="notificationwebhookmapping",
26            options={"verbose_name": "Webhook Mapping", "verbose_name_plural": "Webhook Mappings"},
27        ),
28    ]
class Migration(django.db.migrations.migration.Migration):
 6class Migration(migrations.Migration):
 7    dependencies = [
 8        ("authentik_events", "0001_squashed_0019_alter_notificationtransport_webhook_url"),
 9    ]
10
11    operations = [
12        migrations.AlterField(
13            model_name="notificationtransport",
14            name="mode",
15            field=models.TextField(
16                choices=[
17                    ("local", "authentik inbuilt notifications"),
18                    ("webhook", "Generic Webhook"),
19                    ("webhook_slack", "Slack Webhook (Slack/Discord)"),
20                    ("email", "Email"),
21                ],
22                default="local",
23            ),
24        ),
25        migrations.AlterModelOptions(
26            name="notificationwebhookmapping",
27            options={"verbose_name": "Webhook Mapping", "verbose_name_plural": "Webhook Mappings"},
28        ),
29    ]

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', '0001_squashed_0019_alter_notificationtransport_webhook_url')]
operations = [<AlterField model_name='notificationtransport', name='mode', field=<django.db.models.fields.TextField>>, <AlterModelOptions name='notificationwebhookmapping', options={'verbose_name': 'Webhook Mapping', 'verbose_name_plural': 'Webhook Mappings'}>]