authentik.endpoints.migrations.0002_rename_devicegroup_deviceaccessgroup_and_more

 1# Generated by Django 5.2.8 on 2025-11-27 00:16
 2
 3from django.db import migrations, models
 4
 5
 6class Migration(migrations.Migration):
 7
 8    dependencies = [
 9        ("authentik_endpoints", "0001_initial"),
10        ("authentik_endpoints_connectors_agent", "0001_initial"),
11        ("authentik_policies", "0011_policybinding_failure_result_and_more"),
12    ]
13
14    operations = [
15        migrations.RenameModel(
16            old_name="DeviceGroup",
17            new_name="DeviceAccessGroup",
18        ),
19        migrations.AlterModelOptions(
20            name="device",
21            options={"verbose_name": "Device", "verbose_name_plural": "Devices"},
22        ),
23        migrations.AlterModelOptions(
24            name="deviceaccessgroup",
25            options={
26                "verbose_name": "Device access group",
27                "verbose_name_plural": "Device access groups",
28            },
29        ),
30        migrations.AlterModelOptions(
31            name="deviceconnection",
32            options={
33                "verbose_name": "Device connection",
34                "verbose_name_plural": "Device connections",
35            },
36        ),
37        migrations.AlterModelOptions(
38            name="devicefactsnapshot",
39            options={
40                "verbose_name": "Device fact snapshot",
41                "verbose_name_plural": "Device fact snapshots",
42            },
43        ),
44        migrations.AlterModelOptions(
45            name="deviceuserbinding",
46            options={
47                "verbose_name": "Device User binding",
48                "verbose_name_plural": "Device User bindings",
49            },
50        ),
51        migrations.RenameField(
52            model_name="device",
53            old_name="group",
54            new_name="access_group",
55        ),
56        migrations.AlterField(
57            model_name="device",
58            name="name",
59            field=models.TextField(unique=True),
60        ),
61    ]
class Migration(django.db.migrations.migration.Migration):
 7class Migration(migrations.Migration):
 8
 9    dependencies = [
10        ("authentik_endpoints", "0001_initial"),
11        ("authentik_endpoints_connectors_agent", "0001_initial"),
12        ("authentik_policies", "0011_policybinding_failure_result_and_more"),
13    ]
14
15    operations = [
16        migrations.RenameModel(
17            old_name="DeviceGroup",
18            new_name="DeviceAccessGroup",
19        ),
20        migrations.AlterModelOptions(
21            name="device",
22            options={"verbose_name": "Device", "verbose_name_plural": "Devices"},
23        ),
24        migrations.AlterModelOptions(
25            name="deviceaccessgroup",
26            options={
27                "verbose_name": "Device access group",
28                "verbose_name_plural": "Device access groups",
29            },
30        ),
31        migrations.AlterModelOptions(
32            name="deviceconnection",
33            options={
34                "verbose_name": "Device connection",
35                "verbose_name_plural": "Device connections",
36            },
37        ),
38        migrations.AlterModelOptions(
39            name="devicefactsnapshot",
40            options={
41                "verbose_name": "Device fact snapshot",
42                "verbose_name_plural": "Device fact snapshots",
43            },
44        ),
45        migrations.AlterModelOptions(
46            name="deviceuserbinding",
47            options={
48                "verbose_name": "Device User binding",
49                "verbose_name_plural": "Device User bindings",
50            },
51        ),
52        migrations.RenameField(
53            model_name="device",
54            old_name="group",
55            new_name="access_group",
56        ),
57        migrations.AlterField(
58            model_name="device",
59            name="name",
60            field=models.TextField(unique=True),
61        ),
62    ]

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_endpoints', '0001_initial'), ('authentik_endpoints_connectors_agent', '0001_initial'), ('authentik_policies', '0011_policybinding_failure_result_and_more')]
operations = [<RenameModel old_name='DeviceGroup', new_name='DeviceAccessGroup'>, <AlterModelOptions name='device', options={'verbose_name': 'Device', 'verbose_name_plural': 'Devices'}>, <AlterModelOptions name='deviceaccessgroup', options={'verbose_name': 'Device access group', 'verbose_name_plural': 'Device access groups'}>, <AlterModelOptions name='deviceconnection', options={'verbose_name': 'Device connection', 'verbose_name_plural': 'Device connections'}>, <AlterModelOptions name='devicefactsnapshot', options={'verbose_name': 'Device fact snapshot', 'verbose_name_plural': 'Device fact snapshots'}>, <AlterModelOptions name='deviceuserbinding', options={'verbose_name': 'Device User binding', 'verbose_name_plural': 'Device User bindings'}>, <RenameField model_name='device', old_name='group', new_name='access_group'>, <AlterField model_name='device', name='name', field=<django.db.models.fields.TextField>>]