# Generated by Django 3.1.7 on 2021-10-24 19:38

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):
    dependencies = [
        ("permissions", "0001_initial"),
        ("flow", "0002_squashed_0049_json_field"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="collection",
            options={
                "default_permissions": (),
                "get_latest_by": "version",
                "permissions": (
                    ("view", "Can view collection"),
                    ("edit", "Can edit collection"),
                    ("share", "Can share collection"),
                    ("owner", "Is owner of the collection"),
                ),
            },
        ),
        migrations.AlterModelOptions(
            name="data",
            options={
                "default_permissions": (),
                "get_latest_by": "version",
                "permissions": (
                    ("view", "Can view data"),
                    ("edit", "Can edit data"),
                    ("share", "Can share data"),
                    ("owner", "Is owner of the data"),
                ),
            },
        ),
        migrations.AlterModelOptions(
            name="descriptorschema",
            options={
                "default_permissions": (),
                "get_latest_by": "version",
                "permissions": (
                    ("view", "Can view descriptor schema"),
                    ("edit", "Can edit descriptor schema"),
                    ("share", "Can share descriptor schema"),
                    ("owner", "Is owner of the description schema"),
                ),
            },
        ),
        migrations.AlterModelOptions(
            name="entity",
            options={
                "default_permissions": (),
                "get_latest_by": "version",
                "permissions": (
                    ("view", "Can view entity"),
                    ("edit", "Can edit entity"),
                    ("share", "Can share entity"),
                    ("owner", "Is owner of the entity"),
                ),
            },
        ),
        migrations.AlterModelOptions(
            name="process",
            options={
                "default_permissions": (),
                "get_latest_by": "version",
                "permissions": (
                    ("view", "Can view process"),
                    ("share", "Can share process"),
                    ("owner", "Is owner of the process"),
                ),
            },
        ),
        migrations.AlterModelOptions(
            name="relation",
            options={
                "default_permissions": (),
                "get_latest_by": "version",
                "permissions": (
                    ("view", "Can view relation"),
                    ("edit", "Can edit relation"),
                    ("share", "Can share relation"),
                    ("owner", "Is owner of the relation"),
                ),
            },
        ),
        migrations.AddField(
            model_name="collection",
            name="permission_group",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="collection",
                to="permissions.permissiongroup",
            ),
        ),
        migrations.AddField(
            model_name="data",
            name="permission_group",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="data",
                to="permissions.permissiongroup",
            ),
        ),
        migrations.AddField(
            model_name="descriptorschema",
            name="permission_group",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="descriptorschema",
                to="permissions.permissiongroup",
            ),
        ),
        migrations.AddField(
            model_name="entity",
            name="permission_group",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="entity",
                to="permissions.permissiongroup",
            ),
        ),
        migrations.AddField(
            model_name="process",
            name="permission_group",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="process",
                to="permissions.permissiongroup",
            ),
        ),
        migrations.AddField(
            model_name="relation",
            name="permission_group",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="relation",
                to="permissions.permissiongroup",
            ),
        ),
    ]
