authentik.providers.saml.migrations.0019_samlprovider_default_name_id_policy

 1# Generated by Django 5.1.11 on 2025-06-18 09:27
 2
 3from django.db import migrations, models
 4
 5
 6class Migration(migrations.Migration):
 7
 8    dependencies = [
 9        ("authentik_providers_saml", "0018_alter_samlprovider_acs_url"),
10    ]
11
12    operations = [
13        migrations.AddField(
14            model_name="samlprovider",
15            name="default_name_id_policy",
16            field=models.TextField(
17                choices=[
18                    ("urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", "Email"),
19                    ("urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", "Persistent"),
20                    ("urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName", "X509"),
21                    (
22                        "urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName",
23                        "Windows",
24                    ),
25                    ("urn:oasis:names:tc:SAML:2.0:nameid-format:transient", "Transient"),
26                    ("urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", "Unspecified"),
27                ],
28                default="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified",
29            ),
30        ),
31    ]
class Migration(django.db.migrations.migration.Migration):
 7class Migration(migrations.Migration):
 8
 9    dependencies = [
10        ("authentik_providers_saml", "0018_alter_samlprovider_acs_url"),
11    ]
12
13    operations = [
14        migrations.AddField(
15            model_name="samlprovider",
16            name="default_name_id_policy",
17            field=models.TextField(
18                choices=[
19                    ("urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", "Email"),
20                    ("urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", "Persistent"),
21                    ("urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName", "X509"),
22                    (
23                        "urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName",
24                        "Windows",
25                    ),
26                    ("urn:oasis:names:tc:SAML:2.0:nameid-format:transient", "Transient"),
27                    ("urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", "Unspecified"),
28                ],
29                default="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified",
30            ),
31        ),
32    ]

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_providers_saml', '0018_alter_samlprovider_acs_url')]
operations = [<AddField model_name='samlprovider', name='default_name_id_policy', field=<django.db.models.fields.TextField>>]