# Generated by Django 4.1 on 2022-09-14 08:43

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),
        ("zapier_triggers", "0001_initial"),
    ]

    operations = [
        migrations.AddField(
            model_name="triggersubscription",
            name="zap",
            field=models.CharField(
                blank=True,
                default="",
                help_text="Zap identifier sourced from `${bundle.meta.zap.id}` in the form 'subscription:22068168'.",
                max_length=25,
            ),
        ),
        migrations.AlterField(
            model_name="triggersubscription",
            name="user",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="zapier_subscriptions",
                to=settings.AUTH_USER_MODEL,
            ),
        ),
        migrations.AddConstraint(
            model_name="triggersubscription",
            constraint=models.UniqueConstraint(
                fields=("user", "trigger", "zap"), name="unique_user_zap"
            ),
        ),
    ]
