# Generated by Django 4.2.16 on 2025-01-27 18:46

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


class Migration(migrations.Migration):

    dependencies = [
        ('user_management', '0029_remove_organization_general_log_channel_id_db'),
        ('webhooks', '0017_alter_webhook_trigger_type_and_more'),
    ]

    operations = [
        migrations.AlterField(
            model_name='webhook',
            name='trigger_type',
            field=models.IntegerField(choices=[(0, 'Manual or escalation step'), (1, 'Alert Group Created'), (2, 'Acknowledged'), (3, 'Resolved'), (4, 'Silenced'), (5, 'Unsilenced'), (6, 'Unresolved'), (7, 'Unacknowledged'), (8, 'Status change'), (9, 'Personal notification')], default=0, null=True),
        ),
        migrations.AlterField(
            model_name='webhookresponse',
            name='trigger_type',
            field=models.IntegerField(choices=[(0, 'Manual or escalation step'), (1, 'Alert Group Created'), (2, 'Acknowledged'), (3, 'Resolved'), (4, 'Silenced'), (5, 'Unsilenced'), (6, 'Unresolved'), (7, 'Unacknowledged'), (8, 'Status change'), (9, 'Personal notification')]),
        ),
        migrations.CreateModel(
            name='PersonalNotificationWebhook',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('additional_context_data', mirage.fields.EncryptedTextField(null=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='personal_webhook', to='user_management.user')),
                ('webhook', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='personal_channels', to='webhooks.webhook')),
            ],
        ),
    ]
