# Generated by Django 4.2.15 on 2024-10-04 16:38

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


class Migration(migrations.Migration):

    dependencies = [
        ('user_management', '0022_alter_team_unique_together'),
        ('alerts', '0059_escalationpolicy_severity_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='RelatedIncident',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('incident_id', models.CharField(db_index=True, max_length=50)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField(default=True)),
                ('attached_alert_groups', models.ManyToManyField(related_name='related_incidents', to='alerts.alertgroup')),
                ('channel_filter', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='related_incidents', to='alerts.channelfilter')),
                ('organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='related_incidents', to='user_management.organization')),
            ],
            options={
                'unique_together': {('organization', 'incident_id')},
            },
        ),
    ]
