authentik.enterprise.providers.microsoft_entra.migrations.0005_microsoftentraproviderpropertymappingsgroup_and_more

 1# Generated by Django 5.2.15 on 2026-06-23 15:35
 2
 3import django.db.models.deletion
 4from django.db import migrations, models
 5
 6
 7class Migration(migrations.Migration):
 8
 9    dependencies = [
10        ("authentik_core", "0060_sourcegrouppropertymapping_and_more"),
11        (
12            "authentik_providers_microsoft_entra",
13            "0004_microsoftentraprovider_sync_page_size_and_more",
14        ),
15    ]
16
17    operations = [
18        migrations.SeparateDatabaseAndState(
19            database_operations=[],
20            state_operations=[
21                migrations.CreateModel(
22                    name="MicrosoftEntraProviderPropertyMappingsGroup",
23                    fields=[
24                        (
25                            "id",
26                            models.AutoField(
27                                auto_created=True,
28                                primary_key=True,
29                                serialize=False,
30                                verbose_name="ID",
31                            ),
32                        ),
33                        (
34                            "microsoft_entra_provider",
35                            models.ForeignKey(
36                                db_column="microsoftentraprovider_id",
37                                on_delete=django.db.models.deletion.CASCADE,
38                                to="authentik_providers_microsoft_entra.microsoftentraprovider",
39                            ),
40                        ),
41                        (
42                            "property_mapping",
43                            models.ForeignKey(
44                                db_column="propertymapping_id",
45                                on_delete=django.db.models.deletion.CASCADE,
46                                to="authentik_core.propertymapping",
47                            ),
48                        ),
49                    ],
50                    options={
51                        "db_table": "authentik_providers_microsoft_entra_microsoftentraprovider_9f0b",
52                        "unique_together": {("microsoft_entra_provider", "property_mapping")},
53                        "verbose_name": "Microsoft Entra Provider Property Mappings Group",
54                        "verbose_name_plural": "Microsoft Entra Provider Property Mappings Groups",
55                    },
56                ),
57                migrations.AlterField(
58                    model_name="microsoftentraprovider",
59                    name="property_mappings_group",
60                    field=models.ManyToManyField(
61                        blank=True,
62                        default=None,
63                        help_text="Property mappings used for group creation/updating.",
64                        through="authentik_providers_microsoft_entra.MicrosoftEntraProviderPropertyMappingsGroup",
65                        to="authentik_core.propertymapping",
66                    ),
67                ),
68            ],
69        ),
70    ]
class Migration(django.db.migrations.migration.Migration):
 8class Migration(migrations.Migration):
 9
10    dependencies = [
11        ("authentik_core", "0060_sourcegrouppropertymapping_and_more"),
12        (
13            "authentik_providers_microsoft_entra",
14            "0004_microsoftentraprovider_sync_page_size_and_more",
15        ),
16    ]
17
18    operations = [
19        migrations.SeparateDatabaseAndState(
20            database_operations=[],
21            state_operations=[
22                migrations.CreateModel(
23                    name="MicrosoftEntraProviderPropertyMappingsGroup",
24                    fields=[
25                        (
26                            "id",
27                            models.AutoField(
28                                auto_created=True,
29                                primary_key=True,
30                                serialize=False,
31                                verbose_name="ID",
32                            ),
33                        ),
34                        (
35                            "microsoft_entra_provider",
36                            models.ForeignKey(
37                                db_column="microsoftentraprovider_id",
38                                on_delete=django.db.models.deletion.CASCADE,
39                                to="authentik_providers_microsoft_entra.microsoftentraprovider",
40                            ),
41                        ),
42                        (
43                            "property_mapping",
44                            models.ForeignKey(
45                                db_column="propertymapping_id",
46                                on_delete=django.db.models.deletion.CASCADE,
47                                to="authentik_core.propertymapping",
48                            ),
49                        ),
50                    ],
51                    options={
52                        "db_table": "authentik_providers_microsoft_entra_microsoftentraprovider_9f0b",
53                        "unique_together": {("microsoft_entra_provider", "property_mapping")},
54                        "verbose_name": "Microsoft Entra Provider Property Mappings Group",
55                        "verbose_name_plural": "Microsoft Entra Provider Property Mappings Groups",
56                    },
57                ),
58                migrations.AlterField(
59                    model_name="microsoftentraprovider",
60                    name="property_mappings_group",
61                    field=models.ManyToManyField(
62                        blank=True,
63                        default=None,
64                        help_text="Property mappings used for group creation/updating.",
65                        through="authentik_providers_microsoft_entra.MicrosoftEntraProviderPropertyMappingsGroup",
66                        to="authentik_core.propertymapping",
67                    ),
68                ),
69            ],
70        ),
71    ]

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', '0060_sourcegrouppropertymapping_and_more'), ('authentik_providers_microsoft_entra', '0004_microsoftentraprovider_sync_page_size_and_more')]
operations = [<SeparateDatabaseAndState database_operations=[], state_operations=[<CreateModel name='MicrosoftEntraProviderPropertyMappingsGroup', fields=[('id', <django.db.models.fields.AutoField>), ('microsoft_entra_provider', <django.db.models.fields.related.ForeignKey>), ('property_mapping', <django.db.models.fields.related.ForeignKey>)], options={'db_table': 'authentik_providers_microsoft_entra_microsoftentraprovider_9f0b', 'unique_together': {('microsoft_entra_provider', 'property_mapping')}, 'verbose_name': 'Microsoft Entra Provider Property Mappings Group', 'verbose_name_plural': 'Microsoft Entra Provider Property Mappings Groups'}>, <AlterField model_name='microsoftentraprovider', name='property_mappings_group', field=<django.db.models.fields.related.ManyToManyField>>]>]