authentik.flows.migrations.0019_alter_flow_background_squashed_0024_alter_flow_compatibility_mode

 1# Generated by Django 3.2.8 on 2021-10-10 16:10
 2
 3from django.db import migrations, models
 4
 5
 6class Migration(migrations.Migration):
 7    replaces = [
 8        ("authentik_flows", "0019_alter_flow_background"),
 9        ("authentik_flows", "0020_flow_compatibility_mode"),
10        ("authentik_flows", "0021_flowstagebinding_invalid_response_action"),
11        ("authentik_flows", "0022_alter_flowstagebinding_invalid_response_action"),
12        ("authentik_flows", "0023_alter_flow_background"),
13        ("authentik_flows", "0024_alter_flow_compatibility_mode"),
14    ]
15
16    dependencies = [
17        ("authentik_flows", "0018_oob_flows"),
18    ]
19
20    operations = [
21        migrations.AlterField(
22            model_name="flow",
23            name="background",
24            field=models.FileField(
25                default=None,
26                help_text="Background shown during execution",
27                null=True,
28                upload_to="flow-backgrounds/",
29            ),
30        ),
31        migrations.AddField(
32            model_name="flowstagebinding",
33            name="invalid_response_action",
34            field=models.TextField(
35                choices=[
36                    ("retry", "Retry"),
37                    ("restart", "Restart"),
38                    ("restart_with_context", "Restart With Context"),
39                ],
40                default="retry",
41                help_text=(
42                    "Configure how the flow executor should handle an invalid response to a"
43                    " challenge. RETRY returns the error message and a similar challenge to the"
44                    " executor. RESTART restarts the flow from the beginning, and"
45                    " RESTART_WITH_CONTEXT restarts the flow while keeping the current context."
46                ),
47            ),
48        ),
49        migrations.AlterField(
50            model_name="flow",
51            name="background",
52            field=models.FileField(
53                default=None,
54                help_text="Background shown during execution",
55                max_length=500,
56                null=True,
57                upload_to="flow-backgrounds/",
58            ),
59        ),
60        migrations.AddField(
61            model_name="flow",
62            name="compatibility_mode",
63            field=models.BooleanField(
64                default=False,
65                help_text=(
66                    "Enable compatibility mode, increases compatibility with password managers on"
67                    " mobile devices."
68                ),
69            ),
70        ),
71    ]
class Migration(django.db.migrations.migration.Migration):
 7class Migration(migrations.Migration):
 8    replaces = [
 9        ("authentik_flows", "0019_alter_flow_background"),
10        ("authentik_flows", "0020_flow_compatibility_mode"),
11        ("authentik_flows", "0021_flowstagebinding_invalid_response_action"),
12        ("authentik_flows", "0022_alter_flowstagebinding_invalid_response_action"),
13        ("authentik_flows", "0023_alter_flow_background"),
14        ("authentik_flows", "0024_alter_flow_compatibility_mode"),
15    ]
16
17    dependencies = [
18        ("authentik_flows", "0018_oob_flows"),
19    ]
20
21    operations = [
22        migrations.AlterField(
23            model_name="flow",
24            name="background",
25            field=models.FileField(
26                default=None,
27                help_text="Background shown during execution",
28                null=True,
29                upload_to="flow-backgrounds/",
30            ),
31        ),
32        migrations.AddField(
33            model_name="flowstagebinding",
34            name="invalid_response_action",
35            field=models.TextField(
36                choices=[
37                    ("retry", "Retry"),
38                    ("restart", "Restart"),
39                    ("restart_with_context", "Restart With Context"),
40                ],
41                default="retry",
42                help_text=(
43                    "Configure how the flow executor should handle an invalid response to a"
44                    " challenge. RETRY returns the error message and a similar challenge to the"
45                    " executor. RESTART restarts the flow from the beginning, and"
46                    " RESTART_WITH_CONTEXT restarts the flow while keeping the current context."
47                ),
48            ),
49        ),
50        migrations.AlterField(
51            model_name="flow",
52            name="background",
53            field=models.FileField(
54                default=None,
55                help_text="Background shown during execution",
56                max_length=500,
57                null=True,
58                upload_to="flow-backgrounds/",
59            ),
60        ),
61        migrations.AddField(
62            model_name="flow",
63            name="compatibility_mode",
64            field=models.BooleanField(
65                default=False,
66                help_text=(
67                    "Enable compatibility mode, increases compatibility with password managers on"
68                    " mobile devices."
69                ),
70            ),
71        ),
72    ]

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.

replaces = [('authentik_flows', '0019_alter_flow_background'), ('authentik_flows', '0020_flow_compatibility_mode'), ('authentik_flows', '0021_flowstagebinding_invalid_response_action'), ('authentik_flows', '0022_alter_flowstagebinding_invalid_response_action'), ('authentik_flows', '0023_alter_flow_background'), ('authentik_flows', '0024_alter_flow_compatibility_mode')]
dependencies = [('authentik_flows', '0018_oob_flows')]
operations = [<AlterField model_name='flow', name='background', field=<django.db.models.fields.files.FileField>>, <AddField model_name='flowstagebinding', name='invalid_response_action', field=<django.db.models.fields.TextField>>, <AlterField model_name='flow', name='background', field=<django.db.models.fields.files.FileField>>, <AddField model_name='flow', name='compatibility_mode', field=<django.db.models.fields.BooleanField>>]