2020-05-15 20:15:01 +00:00
|
|
|
# Generated by Django 3.0.5 on 2020-05-15 19:58
|
2020-05-07 18:51:06 +00:00
|
|
|
|
|
|
|
import uuid
|
|
|
|
|
|
|
|
import django.db.models.deletion
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
2020-05-15 20:15:01 +00:00
|
|
|
("passbook_policies", "__first__"),
|
2020-05-07 18:51:06 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="Flow",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"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=[
|
2020-05-15 20:15:01 +00:00
|
|
|
("authentication", "Authentication"),
|
|
|
|
("invalidation", "Invalidation"),
|
|
|
|
("enrollment", "Enrollment"),
|
|
|
|
("unenrollment", "Unrenollment"),
|
|
|
|
("recovery", "Recovery"),
|
|
|
|
("password_change", "Password Change"),
|
2020-05-07 18:51:06 +00:00
|
|
|
],
|
|
|
|
max_length=100,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"pbm",
|
|
|
|
models.OneToOneField(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
|
|
parent_link=True,
|
|
|
|
related_name="+",
|
|
|
|
to="passbook_policies.PolicyBindingModel",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
options={"verbose_name": "Flow", "verbose_name_plural": "Flows",},
|
|
|
|
bases=("passbook_policies.policybindingmodel", models.Model),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2020-05-08 17:46:39 +00:00
|
|
|
name="Stage",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"uuid",
|
|
|
|
models.UUIDField(
|
|
|
|
default=uuid.uuid4,
|
|
|
|
editable=False,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
("name", models.TextField()),
|
|
|
|
],
|
|
|
|
options={"abstract": False,},
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="FlowStageBinding",
|
2020-05-07 18:51:06 +00:00
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"policybindingmodel_ptr",
|
|
|
|
models.OneToOneField(
|
|
|
|
auto_created=True,
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
|
|
parent_link=True,
|
|
|
|
to="passbook_policies.PolicyBindingModel",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"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.",
|
|
|
|
),
|
|
|
|
),
|
2020-05-07 18:51:06 +00:00
|
|
|
("order", models.IntegerField()),
|
|
|
|
(
|
2020-05-08 17:46:39 +00:00
|
|
|
"flow",
|
2020-05-07 18:51:06 +00:00
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
2020-05-08 17:46:39 +00:00
|
|
|
to="passbook_flows.Flow",
|
2020-05-07 18:51:06 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2020-05-08 17:46:39 +00:00
|
|
|
"stage",
|
2020-05-07 18:51:06 +00:00
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
2020-05-08 17:46:39 +00:00
|
|
|
to="passbook_flows.Stage",
|
2020-05-07 18:51:06 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
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")},
|
2020-05-07 18:51:06 +00:00
|
|
|
},
|
|
|
|
bases=("passbook_policies.policybindingmodel", models.Model),
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name="flow",
|
2020-05-08 17:46:39 +00:00
|
|
|
name="stages",
|
2020-05-07 18:51:06 +00:00
|
|
|
field=models.ManyToManyField(
|
2020-05-08 17:46:39 +00:00
|
|
|
blank=True,
|
|
|
|
through="passbook_flows.FlowStageBinding",
|
|
|
|
to="passbook_flows.Stage",
|
2020-05-07 18:51:06 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
]
|