2020-05-16 14:02:42 +00:00
|
|
|
# Generated by Django 3.0.3 on 2020-05-07 18:35
|
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
|
|
|
|
|
2020-05-16 14:02:42 +00:00
|
|
|
dependencies = [
|
|
|
|
("passbook_core", "0011_auto_20200222_1822"),
|
|
|
|
]
|
2020-05-07 18:51:06 +00:00
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="PolicyBinding",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"uuid",
|
|
|
|
models.UUIDField(
|
|
|
|
default=uuid.uuid4,
|
|
|
|
editable=False,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
("enabled", models.BooleanField(default=True)),
|
|
|
|
("order", models.IntegerField(default=0)),
|
|
|
|
(
|
|
|
|
"policy",
|
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
|
|
related_name="+",
|
2020-05-16 14:02:42 +00:00
|
|
|
to="passbook_core.Policy",
|
2020-05-07 18:51:06 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
"verbose_name": "Policy Binding",
|
|
|
|
"verbose_name_plural": "Policy Bindings",
|
|
|
|
},
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name="PolicyBindingModel",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name="ID",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"policies",
|
|
|
|
models.ManyToManyField(
|
|
|
|
related_name="_policybindingmodel_policies_+",
|
|
|
|
through="passbook_policies.PolicyBinding",
|
2020-05-16 14:02:42 +00:00
|
|
|
to="passbook_core.Policy",
|
2020-05-07 18:51:06 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name="policybinding",
|
|
|
|
name="target",
|
|
|
|
field=models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
|
|
related_name="+",
|
|
|
|
to="passbook_policies.PolicyBindingModel",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
]
|