This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/passbook/flows/migrations/0001_initial.py

139 lines
4.5 KiB
Python
Raw Normal View History

# Generated by Django 3.0.6 on 2020-05-19 22:07
import uuid
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
("passbook_policies", "0001_initial"),
]
operations = [
migrations.CreateModel(
name="Flow",
fields=[
(
"flow_uuid",
models.UUIDField(
default=uuid.uuid4,
editable=False,
primary_key=True,
serialize=False,
),
),
("name", models.TextField()),
("slug", models.SlugField(unique=True)),
(
"designation",
models.CharField(
choices=[
("authentication", "Authentication"),
("invalidation", "Invalidation"),
("enrollment", "Enrollment"),
("unenrollment", "Unrenollment"),
("recovery", "Recovery"),
("password_change", "Password Change"),
],
max_length=100,
),
),
(
"pbm",
models.OneToOneField(
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
related_name="+",
to="passbook_policies.PolicyBindingModel",
),
),
],
2020-09-30 17:34:22 +00:00
options={
"verbose_name": "Flow",
"verbose_name_plural": "Flows",
},
bases=("passbook_policies.policybindingmodel",),
),
migrations.CreateModel(
2020-05-08 17:46:39 +00:00
name="Stage",
fields=[
(
"stage_uuid",
2020-05-08 17:46:39 +00:00
models.UUIDField(
default=uuid.uuid4,
editable=False,
primary_key=True,
serialize=False,
),
),
("name", models.TextField()),
],
),
migrations.CreateModel(
name="FlowStageBinding",
fields=[
(
"policybindingmodel_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
to="passbook_policies.PolicyBindingModel",
),
),
(
"fsb_uuid",
models.UUIDField(
default=uuid.uuid4,
editable=False,
primary_key=True,
serialize=False,
),
),
2020-05-08 17:46:39 +00:00
(
"re_evaluate_policies",
models.BooleanField(
default=False,
help_text="When this option is enabled, the planner will re-evaluate policies bound to this.",
),
),
("order", models.IntegerField()),
(
2020-05-08 17:46:39 +00:00
"flow",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
2020-05-08 17:46:39 +00:00
to="passbook_flows.Flow",
),
),
(
2020-05-08 17:46:39 +00:00
"stage",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
2020-05-08 17:46:39 +00:00
to="passbook_flows.Stage",
),
),
],
options={
2020-05-08 17:46:39 +00:00
"verbose_name": "Flow Stage Binding",
"verbose_name_plural": "Flow Stage Bindings",
"ordering": ["order", "flow"],
"unique_together": {("flow", "stage", "order")},
},
bases=("passbook_policies.policybindingmodel",),
),
migrations.AddField(
model_name="flow",
2020-05-08 17:46:39 +00:00
name="stages",
field=models.ManyToManyField(
2020-05-08 17:46:39 +00:00
blank=True,
through="passbook_flows.FlowStageBinding",
to="passbook_flows.Stage",
),
),
]