authentik.stages.captcha.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="CaptchaStage",
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                (
30                    "public_key",
31                    models.TextField(
32                        help_text=(
33                            "Public key, acquired from"
34                            " https://www.google.com/recaptcha/intro/v3.html"
35                        )
36                    ),
37                ),
38                (
39                    "private_key",
40                    models.TextField(
41                        help_text=(
42                            "Private key, acquired from"
43                            " https://www.google.com/recaptcha/intro/v3.html"
44                        )
45                    ),
46                ),
47            ],
48            options={
49                "verbose_name": "Captcha Stage",
50                "verbose_name_plural": "Captcha Stages",
51            },
52            bases=("authentik_flows.stage",),
53        ),
54    ]
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="CaptchaStage",
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                (
31                    "public_key",
32                    models.TextField(
33                        help_text=(
34                            "Public key, acquired from"
35                            " https://www.google.com/recaptcha/intro/v3.html"
36                        )
37                    ),
38                ),
39                (
40                    "private_key",
41                    models.TextField(
42                        help_text=(
43                            "Private key, acquired from"
44                            " https://www.google.com/recaptcha/intro/v3.html"
45                        )
46                    ),
47                ),
48            ],
49            options={
50                "verbose_name": "Captcha Stage",
51                "verbose_name_plural": "Captcha Stages",
52            },
53            bases=("authentik_flows.stage",),
54        ),
55    ]

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.

initial = True
dependencies = [('authentik_flows', '0001_initial')]
operations = [<CreateModel name='CaptchaStage', fields=[('stage_ptr', <django.db.models.fields.related.OneToOneField>), ('public_key', <django.db.models.fields.TextField>), ('private_key', <django.db.models.fields.TextField>)], options={'verbose_name': 'Captcha Stage', 'verbose_name_plural': 'Captcha Stages'}, bases=('authentik_flows.stage',)>]