# Generated by Django 2.2.5 on 2020-02-20 11:41

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("workflow_handler", "0012_workflow_n_tasks"),
    ]

    operations = [
        migrations.CreateModel(
            name="WorkflowHook",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created", models.DateTimeField(auto_now_add=True)),
                ("updated", models.DateTimeField(auto_now=True)),
                (
                    "event",
                    models.CharField(
                        db_index=True, max_length=64, verbose_name="Event"
                    ),
                ),
                ("target", models.URLField(max_length=255, verbose_name="Target URL")),
                (
                    "user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="workflowhooks",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
                (
                    "workflow",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="workflow_handler.Workflow",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
    ]
