authentik.policies.password.migrations.0001_initial
1# Generated by Django 3.0.6 on 2020-05-19 22:08 2 3import django.db.models.deletion 4from django.db import migrations, models 5 6 7class Migration(migrations.Migration): 8 initial = True 9 10 dependencies = [ 11 ("authentik_policies", "0001_initial"), 12 ] 13 14 operations = [ 15 migrations.CreateModel( 16 name="PasswordPolicy", 17 fields=[ 18 ( 19 "policy_ptr", 20 models.OneToOneField( 21 auto_created=True, 22 on_delete=django.db.models.deletion.CASCADE, 23 parent_link=True, 24 primary_key=True, 25 serialize=False, 26 to="authentik_policies.Policy", 27 ), 28 ), 29 ("amount_uppercase", models.IntegerField(default=0)), 30 ("amount_lowercase", models.IntegerField(default=0)), 31 ("amount_symbols", models.IntegerField(default=0)), 32 ("length_min", models.IntegerField(default=0)), 33 ( 34 "symbol_charset", 35 models.TextField(default="!\\\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ "), 36 ), 37 ("error_message", models.TextField()), 38 ], 39 options={ 40 "verbose_name": "Password Policy", 41 "verbose_name_plural": "Password Policies", 42 }, 43 bases=("authentik_policies.policy",), 44 ), 45 ]
class
Migration(django.db.migrations.migration.Migration):
8class Migration(migrations.Migration): 9 initial = True 10 11 dependencies = [ 12 ("authentik_policies", "0001_initial"), 13 ] 14 15 operations = [ 16 migrations.CreateModel( 17 name="PasswordPolicy", 18 fields=[ 19 ( 20 "policy_ptr", 21 models.OneToOneField( 22 auto_created=True, 23 on_delete=django.db.models.deletion.CASCADE, 24 parent_link=True, 25 primary_key=True, 26 serialize=False, 27 to="authentik_policies.Policy", 28 ), 29 ), 30 ("amount_uppercase", models.IntegerField(default=0)), 31 ("amount_lowercase", models.IntegerField(default=0)), 32 ("amount_symbols", models.IntegerField(default=0)), 33 ("length_min", models.IntegerField(default=0)), 34 ( 35 "symbol_charset", 36 models.TextField(default="!\\\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ "), 37 ), 38 ("error_message", models.TextField()), 39 ], 40 options={ 41 "verbose_name": "Password Policy", 42 "verbose_name_plural": "Password Policies", 43 }, 44 bases=("authentik_policies.policy",), 45 ), 46 ]
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='PasswordPolicy', fields=[('policy_ptr', <django.db.models.fields.related.OneToOneField>), ('amount_uppercase', <django.db.models.fields.IntegerField>), ('amount_lowercase', <django.db.models.fields.IntegerField>), ('amount_symbols', <django.db.models.fields.IntegerField>), ('length_min', <django.db.models.fields.IntegerField>), ('symbol_charset', <django.db.models.fields.TextField>), ('error_message', <django.db.models.fields.TextField>)], options={'verbose_name': 'Password Policy', 'verbose_name_plural': 'Password Policies'}, bases=('authentik_policies.policy',)>]