authentik.stages.email.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_flows", "0001_initial"), 12 ] 13 14 operations = [ 15 migrations.CreateModel( 16 name="EmailStage", 17 fields=[ 18 ( 19 "stage_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_flows.Stage", 27 ), 28 ), 29 ("host", models.TextField(default="localhost")), 30 ("port", models.IntegerField(default=25)), 31 ("username", models.TextField(blank=True, default="")), 32 ("password", models.TextField(blank=True, default="")), 33 ("use_tls", models.BooleanField(default=False)), 34 ("use_ssl", models.BooleanField(default=False)), 35 ("timeout", models.IntegerField(default=10)), 36 ( 37 "from_address", 38 models.EmailField(default="system@authentik.local", max_length=254), 39 ), 40 ( 41 "token_expiry", 42 models.IntegerField( 43 default=30, help_text="Time in minutes the token sent is valid." 44 ), 45 ), 46 ("subject", models.TextField(default="authentik")), 47 ( 48 "template", 49 models.TextField( 50 choices=[ 51 ( 52 "email/password_reset.html", 53 "Password Reset", 54 ), 55 ( 56 "email/account_confirmation.html", 57 "Account Confirmation", 58 ), 59 ], 60 default="email/password_reset.html", 61 ), 62 ), 63 ], 64 options={ 65 "verbose_name": "Email Stage", 66 "verbose_name_plural": "Email Stages", 67 }, 68 bases=("authentik_flows.stage",), 69 ), 70 ]
class
Migration(django.db.migrations.migration.Migration):
8class Migration(migrations.Migration): 9 initial = True 10 11 dependencies = [ 12 ("authentik_flows", "0001_initial"), 13 ] 14 15 operations = [ 16 migrations.CreateModel( 17 name="EmailStage", 18 fields=[ 19 ( 20 "stage_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_flows.Stage", 28 ), 29 ), 30 ("host", models.TextField(default="localhost")), 31 ("port", models.IntegerField(default=25)), 32 ("username", models.TextField(blank=True, default="")), 33 ("password", models.TextField(blank=True, default="")), 34 ("use_tls", models.BooleanField(default=False)), 35 ("use_ssl", models.BooleanField(default=False)), 36 ("timeout", models.IntegerField(default=10)), 37 ( 38 "from_address", 39 models.EmailField(default="system@authentik.local", max_length=254), 40 ), 41 ( 42 "token_expiry", 43 models.IntegerField( 44 default=30, help_text="Time in minutes the token sent is valid." 45 ), 46 ), 47 ("subject", models.TextField(default="authentik")), 48 ( 49 "template", 50 models.TextField( 51 choices=[ 52 ( 53 "email/password_reset.html", 54 "Password Reset", 55 ), 56 ( 57 "email/account_confirmation.html", 58 "Account Confirmation", 59 ), 60 ], 61 default="email/password_reset.html", 62 ), 63 ), 64 ], 65 options={ 66 "verbose_name": "Email Stage", 67 "verbose_name_plural": "Email Stages", 68 }, 69 bases=("authentik_flows.stage",), 70 ), 71 ]
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='EmailStage', fields=[('stage_ptr', <django.db.models.fields.related.OneToOneField>), ('host', <django.db.models.fields.TextField>), ('port', <django.db.models.fields.IntegerField>), ('username', <django.db.models.fields.TextField>), ('password', <django.db.models.fields.TextField>), ('use_tls', <django.db.models.fields.BooleanField>), ('use_ssl', <django.db.models.fields.BooleanField>), ('timeout', <django.db.models.fields.IntegerField>), ('from_address', <django.db.models.fields.EmailField>), ('token_expiry', <django.db.models.fields.IntegerField>), ('subject', <django.db.models.fields.TextField>), ('template', <django.db.models.fields.TextField>)], options={'verbose_name': 'Email Stage', 'verbose_name_plural': 'Email Stages'}, bases=('authentik_flows.stage',)>]