authentik.sources.saml.migrations.0012_usersamlsourceconnection

 1# Generated by Django 4.1.2 on 2022-10-14 12:01
 2
 3import django.db.models.deletion
 4from django.db import migrations, models
 5
 6
 7class Migration(migrations.Migration):
 8    dependencies = [
 9        ("authentik_core", "0022_alter_group_parent"),
10        ("authentik_sources_saml", "0011_auto_20210324_0736"),
11    ]
12
13    operations = [
14        migrations.CreateModel(
15            name="UserSAMLSourceConnection",
16            fields=[
17                (
18                    "usersourceconnection_ptr",
19                    models.OneToOneField(
20                        auto_created=True,
21                        on_delete=django.db.models.deletion.CASCADE,
22                        parent_link=True,
23                        primary_key=True,
24                        serialize=False,
25                        to="authentik_core.usersourceconnection",
26                    ),
27                ),
28                ("identifier", models.TextField()),
29            ],
30            options={
31                "verbose_name": "User SAML Source Connection",
32                "verbose_name_plural": "User SAML Source Connections",
33            },
34            bases=("authentik_core.usersourceconnection",),
35        ),
36    ]
class Migration(django.db.migrations.migration.Migration):
 8class Migration(migrations.Migration):
 9    dependencies = [
10        ("authentik_core", "0022_alter_group_parent"),
11        ("authentik_sources_saml", "0011_auto_20210324_0736"),
12    ]
13
14    operations = [
15        migrations.CreateModel(
16            name="UserSAMLSourceConnection",
17            fields=[
18                (
19                    "usersourceconnection_ptr",
20                    models.OneToOneField(
21                        auto_created=True,
22                        on_delete=django.db.models.deletion.CASCADE,
23                        parent_link=True,
24                        primary_key=True,
25                        serialize=False,
26                        to="authentik_core.usersourceconnection",
27                    ),
28                ),
29                ("identifier", models.TextField()),
30            ],
31            options={
32                "verbose_name": "User SAML Source Connection",
33                "verbose_name_plural": "User SAML Source Connections",
34            },
35            bases=("authentik_core.usersourceconnection",),
36        ),
37    ]

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_core', '0022_alter_group_parent'), ('authentik_sources_saml', '0011_auto_20210324_0736')]
operations = [<CreateModel name='UserSAMLSourceConnection', fields=[('usersourceconnection_ptr', <django.db.models.fields.related.OneToOneField>), ('identifier', <django.db.models.fields.TextField>)], options={'verbose_name': 'User SAML Source Connection', 'verbose_name_plural': 'User SAML Source Connections'}, bases=('authentik_core.usersourceconnection',)>]