# Generated by Django 5.2.15 on 2026-07-02 22:21

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


class Migration(migrations.Migration):

    dependencies = [
        ('eveonline', '0025_remove_evecharacter_last_updated_and_more'),
        ('eveuniverse', '0012_alter_evebloodline_eve_ship_type'),
        ('fitcheck', '0029_remove_min_meta_level'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='ComplianceSnapshot',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('audience_count', models.PositiveIntegerField(default=0)),
                ('compliant_count', models.PositiveIntegerField(default=0)),
                ('compliant_subs_count', models.PositiveIntegerField(default=0)),
                ('non_compliant_count', models.PositiveIntegerField(default=0)),
                ('no_submission_count', models.PositiveIntegerField(default=0)),
                ('taken_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'default_permissions': (),
            },
        ),
        migrations.AddIndex(
            model_name='fitsubmission',
            index=models.Index(fields=['status', 'verdict', '-created_at'], name='fitcheck_fi_status_603048_idx'),
        ),
        migrations.AddField(
            model_name='compliancesnapshot',
            name='doctrine',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='compliance_snapshots', to='fitcheck.doctrine'),
        ),
        migrations.AddIndex(
            model_name='compliancesnapshot',
            index=models.Index(fields=['date'], name='fitcheck_co_date_f1eab4_idx'),
        ),
        migrations.AddConstraint(
            model_name='compliancesnapshot',
            constraint=models.UniqueConstraint(fields=('doctrine', 'date'), name='fitcheck_snapshot_doctrine_date'),
        ),
    ]
