authentik.providers.oauth2.migrations.0002_oauth2provider_sub_mode
1# Generated by Django 3.1.1 on 2020-09-15 18:49 2 3from django.db import migrations, models 4 5 6class Migration(migrations.Migration): 7 dependencies = [ 8 ("authentik_providers_oauth2", "0001_initial"), 9 ] 10 11 operations = [ 12 migrations.AddField( 13 model_name="oauth2provider", 14 name="sub_mode", 15 field=models.TextField( 16 choices=[ 17 ("hashed_user_id", "Based on the Hashed User ID"), 18 ("user_username", "Based on the username"), 19 ( 20 "user_email", 21 "Based on the User's Email. This is recommended over the UPN method.", 22 ), 23 ( 24 "user_upn", 25 ( 26 "Based on the User's UPN, only works if user has a 'upn' attribute set." 27 " Use this method only if you have different UPN and Mail domains." 28 ), 29 ), 30 ], 31 default="hashed_user_id", 32 help_text=( 33 "Configure what data should be used as unique User Identifier. For most cases," 34 " the default should be fine." 35 ), 36 ), 37 ), 38 ]
class
Migration(django.db.migrations.migration.Migration):
7class Migration(migrations.Migration): 8 dependencies = [ 9 ("authentik_providers_oauth2", "0001_initial"), 10 ] 11 12 operations = [ 13 migrations.AddField( 14 model_name="oauth2provider", 15 name="sub_mode", 16 field=models.TextField( 17 choices=[ 18 ("hashed_user_id", "Based on the Hashed User ID"), 19 ("user_username", "Based on the username"), 20 ( 21 "user_email", 22 "Based on the User's Email. This is recommended over the UPN method.", 23 ), 24 ( 25 "user_upn", 26 ( 27 "Based on the User's UPN, only works if user has a 'upn' attribute set." 28 " Use this method only if you have different UPN and Mail domains." 29 ), 30 ), 31 ], 32 default="hashed_user_id", 33 help_text=( 34 "Configure what data should be used as unique User Identifier. For most cases," 35 " the default should be fine." 36 ), 37 ), 38 ), 39 ]
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.