authentik.enterprise.migrations.0002_rename_users_license_internal_users_and_more

 1# Generated by Django 4.2.4 on 2023-08-23 10:06
 2
 3import django.contrib.postgres.indexes
 4from django.db import migrations, models
 5
 6
 7class Migration(migrations.Migration):
 8    dependencies = [
 9        ("authentik_enterprise", "0001_initial"),
10    ]
11
12    operations = [
13        migrations.RenameField(
14            model_name="license",
15            old_name="users",
16            new_name="internal_users",
17        ),
18        migrations.AlterField(
19            model_name="license",
20            name="key",
21            field=models.TextField(),
22        ),
23        migrations.AddIndex(
24            model_name="license",
25            index=django.contrib.postgres.indexes.HashIndex(
26                fields=["key"], name="authentik_e_key_523e13_hash"
27            ),
28        ),
29        migrations.AlterModelOptions(
30            name="licenseusage",
31            options={
32                "verbose_name": "License Usage",
33                "verbose_name_plural": "License Usage Records",
34            },
35        ),
36        migrations.AlterModelOptions(
37            name="license",
38            options={"verbose_name": "License", "verbose_name_plural": "Licenses"},
39        ),
40    ]
class Migration(django.db.migrations.migration.Migration):
 8class Migration(migrations.Migration):
 9    dependencies = [
10        ("authentik_enterprise", "0001_initial"),
11    ]
12
13    operations = [
14        migrations.RenameField(
15            model_name="license",
16            old_name="users",
17            new_name="internal_users",
18        ),
19        migrations.AlterField(
20            model_name="license",
21            name="key",
22            field=models.TextField(),
23        ),
24        migrations.AddIndex(
25            model_name="license",
26            index=django.contrib.postgres.indexes.HashIndex(
27                fields=["key"], name="authentik_e_key_523e13_hash"
28            ),
29        ),
30        migrations.AlterModelOptions(
31            name="licenseusage",
32            options={
33                "verbose_name": "License Usage",
34                "verbose_name_plural": "License Usage Records",
35            },
36        ),
37        migrations.AlterModelOptions(
38            name="license",
39            options={"verbose_name": "License", "verbose_name_plural": "Licenses"},
40        ),
41    ]

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_enterprise', '0001_initial')]
operations = [<RenameField model_name='license', old_name='users', new_name='internal_users'>, <AlterField model_name='license', name='key', field=<django.db.models.fields.TextField>>, <AddIndex model_name='license', index=<HashIndex: fields=['key'] name='authentik_e_key_523e13_hash'>>, <AlterModelOptions name='licenseusage', options={'verbose_name': 'License Usage', 'verbose_name_plural': 'License Usage Records'}>, <AlterModelOptions name='license', options={'verbose_name': 'License', 'verbose_name_plural': 'Licenses'}>]