# Generated by Django 4.2.6 on 2023-11-01 14:42

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


class Migration(migrations.Migration):

    dependencies = [
        ('alerts', '0035_alter_alertreceivechannel_maintenance_author'),
        ('user_management', '0017_alter_organization_maintenance_author'),
        ('labels', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='AlertGroupAssociatedLabel',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key_name', models.CharField(max_length=200)),
                ('value_name', models.CharField(max_length=200)),
                ('alert_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='labels', to='alerts.alertgroup')),
                ('organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='alert_group_labels', to='user_management.organization')),
            ],
        ),
        migrations.AddConstraint(
            model_name='alertgroupassociatedlabel',
            constraint=models.UniqueConstraint(fields=('organization', 'key_name', 'value_name', 'alert_group'), name='unique_alert_group_label'),
        ),
    ]
