authentik.providers.radius.migrations.0001_initial
1# Generated by Django 4.1.7 on 2023-03-20 10:58 2 3import django.db.models.deletion 4from django.db import migrations, models 5 6import authentik.lib.generators 7 8 9class Migration(migrations.Migration): 10 initial = True 11 12 dependencies = [ 13 ("authentik_core", "0027_alter_user_uuid"), 14 ] 15 16 operations = [ 17 migrations.CreateModel( 18 name="RadiusProvider", 19 fields=[ 20 ( 21 "provider_ptr", 22 models.OneToOneField( 23 auto_created=True, 24 on_delete=django.db.models.deletion.CASCADE, 25 parent_link=True, 26 primary_key=True, 27 serialize=False, 28 to="authentik_core.provider", 29 ), 30 ), 31 ( 32 "shared_secret", 33 models.TextField( 34 default=authentik.lib.generators.generate_id, 35 help_text="Shared secret between clients and server to hash packets.", 36 ), 37 ), 38 ( 39 "client_networks", 40 models.TextField( 41 default="0.0.0.0/0, ::/0", 42 help_text="List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped.", 43 ), 44 ), 45 ], 46 options={ 47 "verbose_name": "Radius Provider", 48 "verbose_name_plural": "Radius Providers", 49 }, 50 bases=("authentik_core.provider", models.Model), 51 ), 52 ]
class
Migration(django.db.migrations.migration.Migration):
10class Migration(migrations.Migration): 11 initial = True 12 13 dependencies = [ 14 ("authentik_core", "0027_alter_user_uuid"), 15 ] 16 17 operations = [ 18 migrations.CreateModel( 19 name="RadiusProvider", 20 fields=[ 21 ( 22 "provider_ptr", 23 models.OneToOneField( 24 auto_created=True, 25 on_delete=django.db.models.deletion.CASCADE, 26 parent_link=True, 27 primary_key=True, 28 serialize=False, 29 to="authentik_core.provider", 30 ), 31 ), 32 ( 33 "shared_secret", 34 models.TextField( 35 default=authentik.lib.generators.generate_id, 36 help_text="Shared secret between clients and server to hash packets.", 37 ), 38 ), 39 ( 40 "client_networks", 41 models.TextField( 42 default="0.0.0.0/0, ::/0", 43 help_text="List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped.", 44 ), 45 ), 46 ], 47 options={ 48 "verbose_name": "Radius Provider", 49 "verbose_name_plural": "Radius Providers", 50 }, 51 bases=("authentik_core.provider", models.Model), 52 ), 53 ]
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.
operations =
[<CreateModel name='RadiusProvider', fields=[('provider_ptr', <django.db.models.fields.related.OneToOneField>), ('shared_secret', <django.db.models.fields.TextField>), ('client_networks', <django.db.models.fields.TextField>)], options={'verbose_name': 'Radius Provider', 'verbose_name_plural': 'Radius Providers'}, bases=('authentik_core.provider', <class 'django.db.models.base.Model'>)>]