# Generated by Django 4.2.19 on 2025-03-29 08:47

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


class Migration(migrations.Migration):

    dependencies = [
        ('eveonline', '0017_alliance_and_corp_names_are_not_unique'),
        ('corptools', '0118_alter_skill_id'),
        ('incursions', '0010_squashed_0009_alter_incursion_state_alter_waitlist_close_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='ActiveFleet',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'verbose_name': 'Waitlist - Fleet (Active)',
                'verbose_name_plural': 'Waitlist - Fleet (Active)',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Announcement',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('message', models.TextField()),
                ('is_alert', models.BooleanField(default=False)),
                ('pages', models.TextField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('revoked_at', models.DateTimeField(blank=True, default=None, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveonline.evecharacter')),
                ('revoked_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveonline.evecharacter')),
            ],
            options={
                'verbose_name': 'Waitlist - Announcement',
                'verbose_name_plural': 'Waitlist - Announcements',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='ApprovedFitting',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('dna', models.TextField(max_length=1024, unique=True)),
                ('tier', models.CharField(choices=[('Basic', 'Sponge'), ('Mainline', 'Mainline'), ('Alt', 'Alt'), ('Other', 'Other')], default='Mainline', max_length=16)),
                ('description', models.CharField(blank=True, max_length=255, null=True)),
            ],
            options={
                'verbose_name': 'Waitlist - Approved Fitting',
                'verbose_name_plural': 'Waitlist - Approved Fittings',
            },
        ),
        migrations.CreateModel(
            name='ApprovedImplantSet',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('set', models.CharField(choices=[('Amulet', 'Amulet'), ('Ascendency', 'Ascendency'), ('None', 'None')], default='Amulet', max_length=16)),
                ('implants', models.CharField(max_length=255, unique=True)),
            ],
            options={
                'verbose_name': 'Waitlist - Approved Implant Set',
                'verbose_name_plural': 'Waitlist - Approved Implant Sets',
            },
        ),
        migrations.CreateModel(
            name='ApprovedSkills',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('hull', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='corptools.eveitemtype', verbose_name='Hull')),
            ],
            options={
                'verbose_name': 'Waitlist - Approved Skills',
                'verbose_name_plural': 'Waitlist - Approved Skills',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Badge',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, unique=True)),
                ('exclude_badge', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='excluded_by', to='incursions.badge')),
            ],
            options={
                'verbose_name': 'Waitlist - Badge',
                'verbose_name_plural': 'Waitlist - Badges',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Ban',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('entity_type', models.CharField(choices=[('Character', 'Character'), ('Corporation', 'Corporation'), ('Alliance', 'Alliance')], default='Character', max_length=12)),
                ('public_reason', models.CharField(blank=True, max_length=512, null=True)),
                ('reason', models.CharField(max_length=512)),
                ('issued_at', models.DateTimeField(auto_now_add=True)),
                ('revoked_at', models.DateTimeField(blank=True, default=None, null=True)),
                ('entity_alliance', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='eveonline.eveallianceinfo')),
                ('entity_character', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='eveonline.evecharacter')),
                ('entity_corporation', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='eveonline.evecorporationinfo')),
                ('issued_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveonline.evecharacter')),
                ('revoked_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveonline.evecharacter')),
            ],
            options={
                'verbose_name': 'Waitlist - Ban',
                'verbose_name_plural': 'Waitlist - Bans',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='CharacterBadges',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('granted_at', models.DateTimeField(auto_now_add=True)),
                ('badge', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='incursions.badge')),
                ('character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='eveonline.evecharacter')),
                ('granted_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveonline.evecharacter')),
            ],
            options={
                'verbose_name': 'Waitlist - Character Badge',
                'verbose_name_plural': 'Waitlist - Character Badges',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='CharacterNote',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('note', models.TextField()),
                ('logged_at', models.DateTimeField(auto_now_add=True)),
                ('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveonline.evecharacter')),
                ('character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='eveonline.evecharacter')),
            ],
            options={
                'verbose_name': 'Waitlist - Character Note',
                'verbose_name_plural': 'Waitlist - Character Note',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='CharacterRoles',
            fields=[
                ('character', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='eveonline.evecharacter')),
                ('granted_at', models.DateTimeField(auto_now_add=True)),
                ('granted_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveonline.evecharacter')),
            ],
            options={
                'verbose_name': 'Waitlist - Character Role',
                'verbose_name_plural': 'Waitlist - Character Roles',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Fitting',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dna', models.TextField(max_length=1024, unique=True)),
                ('ship', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='corptools.eveitemtype', verbose_name='Ship')),
            ],
            options={
                'verbose_name': 'Waitlist - Waitlist Fit',
                'verbose_name_plural': 'Waitlist - Waitlist Fits',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='FittingHistory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('logged_at', models.DateTimeField(auto_now_add=True)),
                ('character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='eveonline.evecharacter')),
                ('fit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='incursions.fitting')),
            ],
            options={
                'verbose_name': 'Waitlist - Fitting History',
                'verbose_name_plural': 'Waitlist - Fitting Histories',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Fleet',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_updating', models.BooleanField(default=False)),
                ('boss', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='eveonline.evecharacter')),
            ],
            options={
                'verbose_name': 'Waitlist - Fleet',
                'verbose_name_plural': 'Waitlist - Fleets',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='FleetActivity',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_seen', models.DateTimeField(auto_now_add=True)),
                ('last_seen', models.DateTimeField(auto_now=True)),
                ('has_left', models.BooleanField(default=False)),
                ('is_boss', models.BooleanField(default=False)),
                ('character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='eveonline.evecharacter')),
                ('fleet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='incursions.fleet', verbose_name='')),
                ('ship', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='corptools.eveitemtype', verbose_name='Ship')),
            ],
            options={
                'verbose_name': 'Waitlist - Fleet Activity',
                'verbose_name_plural': 'Waitlist - Fleet Activities',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='FleetSquad',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('wing_id', models.BigIntegerField()),
                ('squad_id', models.BigIntegerField()),
            ],
            options={
                'verbose_name': 'Waitlist - Fleet Squad',
                'verbose_name_plural': 'Waitlist - Fleet Squad',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='ImplantSet',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('implants', models.CharField(max_length=255, unique=True)),
            ],
            options={
                'verbose_name': 'Waitlist - Waitlist Implant Set',
                'verbose_name_plural': 'Waitlist - Waitlist Implant Sets',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Role',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, unique=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('power', models.IntegerField(default=0, help_text='Bigger is better, user can assign a power level lower than this')),
            ],
            options={
                'verbose_name': 'Waitlist - Role',
                'verbose_name_plural': 'Waitlist - Roles',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='SkillCheck',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('min', models.IntegerField(default=3, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(5)])),
                ('elite', models.IntegerField(default=4, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(5)])),
                ('gold', models.IntegerField(default=5, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(5)])),
                ('skill', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='corptools.eveitemtype', verbose_name='Skill')),
            ],
            options={
                'verbose_name': 'Waitlist - Skill Check',
                'verbose_name_plural': 'Waitlist - Skill Check',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='SkillHistory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('old_level', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(5)])),
                ('new_level', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(5)])),
                ('logged_at', models.DateTimeField(auto_now_add=True)),
                ('character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='eveonline.evecharacter')),
                ('skill', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='corptools.eveitemtype', verbose_name='Skill')),
            ],
            options={
                'verbose_name': 'Waitlist - Skill History',
                'verbose_name_plural': 'Waitlist - Skill Histories',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='WaitlistCategory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
            ],
            options={
                'verbose_name': 'Waitlist - Category',
                'verbose_name_plural': 'Waitlist - Categories',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='WaitlistCategoryRule',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ship', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='corptools.eveitemtype', verbose_name='Ship')),
                ('waitlist_category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='incursions.waitlistcategory', verbose_name='Waitlist Category')),
            ],
            options={
                'verbose_name': 'Waitlist - Category Rule',
                'verbose_name_plural': 'Waitlist - Category Rules',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='WaitlistEntryFit',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('approved', models.BooleanField(default=False)),
                ('tags', models.CharField(help_text='Comma Seperated List', max_length=255)),
                ('fit_analysis', models.TextField(blank=True, help_text='[] apparently', null=True)),
                ('review_comment', models.TextField(blank=True, null=True)),
                ('is_alt', models.BooleanField(default=False)),
                ('messagexup', models.TextField(blank=True, null=True)),
                ('cached_time_in_fleet', models.BigIntegerField()),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='incursions.waitlistcategory', verbose_name='Waitlist Category')),
                ('character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='eveonline.evecharacter')),
                ('fit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='incursions.fitting')),
                ('implant_set', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='incursions.implantset')),
            ],
            options={
                'verbose_name': 'Waitlist - Waitlist Entry Fit',
                'verbose_name_plural': 'Waitlist - Waitlist Entry Fit',
                'default_permissions': (),
            },
        ),
        migrations.AlterModelOptions(
            name='general',
            options={'default_permissions': (), 'managed': False, 'permissions': (('basic_waitlist', 'Can Access The Incursion Waitlist Tool'), ('waitlist_alts_view', 'Can View all of a users Alts ! Danger?'), ('waitlist_announcements_manage', 'can manage announcements'), ('waitlist_bages_view', 'Can View Badges'), ('waitlist_badges_manage', 'Can Manage Badges'), ('waitlist_bans_view', 'Can View Bans'), ('waitlist_bans_manage', 'Can Manage Bans'), ('waitlist_commanders_view', 'can view commanders'), ('waitlist_commanders_manage', 'can manage commanders'), ('waitlist_documentation_view', 'can view documentation'), ('waitlist_fleet_view', 'Can View Active Fleet composition'), ('waitlist_implants_view', 'Can View Implants'), ('waitlist_history_view', 'Can View History'), ('waitlist_notes_view', 'Can View Notes'), ('waitlist_notes_manage', 'Can Manage notes'), ('waitlist_search', 'Can Search'), ('waitlist_stats_view', 'Can View Fleet Stats'), ('waitlist_skills_view', 'Can view Skills'), ('waitlist_context_a', 'Add Context to Waitlist: Number of Pilots'), ('waitlist_context_b', 'Add Context to Waitlist: Ship Types'), ('waitlist_context_c', 'Add Context to Waitlist: Time in Waitlist'), ('waitlist_context_d', 'Add Context to Waitlist: Pilot Names'), ('waitlist_manage_waitlist', 'Manage Waitlist'), ('waitlist_manage_waitlist_approve_fits', 'Can Approve and Deny Fits on the WL'), ('waitlist_esi_show_info', 'Can open a Show Info Window ingame'), ('waitlist_esi_search', 'Will search ESI when using Search'))},
        ),
        migrations.AlterModelOptions(
            name='incursion',
            options={'default_permissions': (), 'verbose_name': 'Incursion', 'verbose_name_plural': 'Incursions'},
        ),
        migrations.AlterModelOptions(
            name='incursioninfluence',
            options={'default_permissions': (), 'verbose_name': 'IncursionInfluence', 'verbose_name_plural': 'IncursionInfluences'},
        ),
        migrations.AlterModelOptions(
            name='waitlist',
            options={'default_permissions': (), 'verbose_name': 'Waitlist - Waitlist', 'verbose_name_plural': 'Waitlist - Waitlist'},
        ),
        migrations.AlterModelOptions(
            name='waitlistentry',
            options={'default_permissions': (), 'verbose_name': 'Waitlist - Waitlist Entry', 'verbose_name_plural': 'Waitlist - Waitlist Entry'},
        ),
        migrations.AlterModelOptions(
            name='webhook',
            options={'default_permissions': (), 'verbose_name': 'Destination Webhook', 'verbose_name_plural': 'Destination Webhooks'},
        ),
        migrations.RemoveField(
            model_name='waitlist',
            name='close',
        ),
        migrations.RemoveField(
            model_name='waitlist',
            name='fc',
        ),
        migrations.RemoveField(
            model_name='waitlist',
            name='open',
        ),
        migrations.RemoveField(
            model_name='waitlistentry',
            name='note',
        ),
        migrations.RemoveField(
            model_name='waitlistentry',
            name='role',
        ),
        migrations.RemoveField(
            model_name='waitlistentry',
            name='ship',
        ),
        migrations.RemoveField(
            model_name='waitlistentry',
            name='time',
        ),
        migrations.RemoveField(
            model_name='waitlistentry',
            name='user',
        ),
        migrations.AddField(
            model_name='waitlist',
            name='is_open',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='waitlist',
            name='name',
            field=models.CharField(default='Waitlist', max_length=255),
        ),
        migrations.AddField(
            model_name='waitlistentry',
            name='joined_at',
            field=models.DateTimeField(auto_now_add=True, null=True),
        ),
        migrations.AddField(
            model_name='waitlistentry',
            name='main_character',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='eveonline.evecharacter'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='waitlistentry',
            name='waitlist',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='incursions.waitlist'),
            preserve_default=False,
        ),
        migrations.DeleteModel(
            name='WaitlistShip',
        ),
        migrations.AddField(
            model_name='waitlistentryfit',
            name='waitlist_entry',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='incursions.waitlistentry'),
        ),
        migrations.AddField(
            model_name='fleetsquad',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='incursions.waitlistcategory', verbose_name='Waitlist Category'),
        ),
        migrations.AddField(
            model_name='fleetsquad',
            name='fleet',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='incursions.fleet'),
        ),
        migrations.AddField(
            model_name='fittinghistory',
            name='implant_set',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='incursions.implantset'),
        ),
        migrations.AddField(
            model_name='characterroles',
            name='role',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='incursion_role', to='incursions.role', verbose_name='Incursion Role'),
        ),
        migrations.AddField(
            model_name='approvedskills',
            name='skill_checks',
            field=models.ManyToManyField(related_name='+', to='incursions.skillcheck', verbose_name='Skill Checks'),
        ),
        migrations.AddField(
            model_name='approvedfitting',
            name='implants',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='incursions.approvedimplantset'),
        ),
        migrations.AddField(
            model_name='approvedfitting',
            name='ship',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='corptools.eveitemtype', verbose_name='Ship'),
        ),
        migrations.AddField(
            model_name='activefleet',
            name='fleet',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='incursions.fleet'),
        ),
        migrations.AlterUniqueTogether(
            name='fleetsquad',
            unique_together={('fleet', 'category')},
        ),
    ]
