109 lines
3.5 KiB
Python
109 lines
3.5 KiB
Python
|
# Generated by Django 3.0.3 on 2020-05-07 18:35
|
||
|
|
||
|
import uuid
|
||
|
|
||
|
import django.db.models.deletion
|
||
|
from django.db import migrations, models
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
initial = True
|
||
|
|
||
|
dependencies = [
|
||
|
("passbook_policies", "0001_initial"),
|
||
|
("passbook_core", "0011_auto_20200222_1822"),
|
||
|
]
|
||
|
|
||
|
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=[
|
||
|
("AUTHENTICATION", "authentication"),
|
||
|
("ENROLLMENT", "enrollment"),
|
||
|
("RECOVERY", "recovery"),
|
||
|
],
|
||
|
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(
|
||
|
name="FlowFactorBinding",
|
||
|
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,
|
||
|
),
|
||
|
),
|
||
|
("order", models.IntegerField()),
|
||
|
(
|
||
|
"factor",
|
||
|
models.ForeignKey(
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
to="passbook_core.Factor",
|
||
|
),
|
||
|
),
|
||
|
(
|
||
|
"flow",
|
||
|
models.ForeignKey(
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
to="passbook_flows.Flow",
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
options={
|
||
|
"verbose_name": "Flow Factor Binding",
|
||
|
"verbose_name_plural": "Flow Factor Bindings",
|
||
|
"unique_together": {("flow", "factor", "order")},
|
||
|
},
|
||
|
bases=("passbook_policies.policybindingmodel", models.Model),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name="flow",
|
||
|
name="factors",
|
||
|
field=models.ManyToManyField(
|
||
|
through="passbook_flows.FlowFactorBinding", to="passbook_core.Factor"
|
||
|
),
|
||
|
),
|
||
|
]
|