# Generated by Django 5.1.6 on 2025-03-04 01:29

# This was built by Deleting Every Migration, Creating one from scratch
# And porting in anything necessary
# Some functions were skipped as they only make sense _if you are migrating in place_
# i.e. permissions migration


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


class Migration(migrations.Migration):

    replaces = [('corputils', '0001_initial'), ('corputils', '0002_migrate_permissions'), ('corputils', '0003_granular_permissions'), ('corputils', '0004_member_models'), ('corputils', '0005_cleanup_permissions')]

    initial = True

    dependencies = [
        ('esi', '0012_fix_token_type_choices'),
        ('eveonline', '0019_v5squash'),
    ]

    operations = [
        migrations.CreateModel(
            name='CorpStats',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('last_update', models.DateTimeField(auto_now=True)),
                ('corp', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='eveonline.evecorporationinfo')),
                ('token', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='esi.token')),
            ],
            options={
                'verbose_name': 'corp stats',
                'verbose_name_plural': 'corp stats',
                'permissions': (('view_corp_corpstats', 'Can view corp stats of their corporation.'), ('view_alliance_corpstats', 'Can view corp stats of members of their alliance.'), ('view_state_corpstats', 'Can view corp stats of members of their auth state.')),
            },
        ),
        migrations.CreateModel(
            name='CorpMember',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('character_id', models.PositiveIntegerField()),
                ('character_name', models.CharField(max_length=37)),
                ('corpstats', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='members', to='corputils.corpstats')),
            ],
            options={
                'ordering': ['character_name'],
                'unique_together': {('corpstats', 'character_id')},
            },
        ),
    ]
