# Generated by Django 4.0.3 on 2022-04-22 15:43

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


class Migration(migrations.Migration):

    dependencies = [
        ('vulnerabilities', '0009_alter_advisory_summary_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='VulnerabilityRelatedReference',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='vulnerabilityreference',
            unique_together={('url', 'reference_id')},
        ),
        migrations.AddField(
            model_name='vulnerability',
            name='references',
            field=models.ManyToManyField(through='vulnerabilities.VulnerabilityRelatedReference', to='vulnerabilities.vulnerabilityreference'),
        ),
        migrations.AddField(
            model_name='vulnerabilityreference',
            name='vulnerabilities',
            field=models.ManyToManyField(through='vulnerabilities.VulnerabilityRelatedReference', to='vulnerabilities.vulnerability'),
        ),
        migrations.AddField(
            model_name='vulnerabilityrelatedreference',
            name='reference',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='vulnerabilities.vulnerabilityreference'),
        ),
        migrations.AddField(
            model_name='vulnerabilityrelatedreference',
            name='vulnerability',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='vulnerabilities.vulnerability'),
        ),
        migrations.RemoveField(
            model_name='vulnerabilityreference',
            name='vulnerability',
        ),
        migrations.AlterUniqueTogether(
            name='vulnerabilityrelatedreference',
            unique_together={('vulnerability', 'reference')},
        ),
    ]
