# Generated by Django 5.2.17 on 2026-08-28 05:40

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('authentication', '0026_alter_characterownership_user_and_more'),
        ('eveonline', '0025_remove_evecharacter_last_updated_and_more'),
        ('eveuniverse', '0012_alter_evebloodline_eve_ship_type'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='General',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'permissions': (('sov_basic', 'SOV: can see the system cost page'), ('sov_officer', 'SOV: can see every sovereignty page'), ('sov_manage', 'SOV: can change sovereignty settings'), ('skyhook_basic', 'Skyhook: can see the raid target page'), ('skyhook_officer', 'Skyhook: can see every skyhook page'), ('skyhook_manage', 'Skyhook: can change skyhook settings'), ('den_basic', 'Den: can see their own dens and timers'), ('den_member', 'Den: can also see the den list and their dashboard'), ('den_officer', 'Den: can see every den page'), ('den_manage', 'Den: can approve claims and change den settings'), ('den_claim', 'Den: can apply for a den slot'), ('manage_owners', 'Can register corporation and character tokens')),
                'managed': False,
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='AlertLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.CharField(max_length=255, unique=True)),
                ('sent_at', models.DateTimeField(db_index=True, default=django.utils.timezone.now)),
            ],
        ),
        migrations.CreateModel(
            name='HoldfastConfig',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fuel_warning_days', models.FloatField(default=7, help_text='Amber below this many days of fuel left.')),
                ('fuel_danger_days', models.FloatField(default=3, help_text='Red below this many days.')),
                ('fuel_critical_days', models.FloatField(default=1, help_text='Critical below this many days.')),
                ('den_anchor_grace_days', models.IntegerField(default=7, help_text='Flag an approved den claim that still has no anchored den after this many days. Never revokes anything by itself.')),
                ('workforce_drop_percent', models.FloatField(default=5, help_text='Flag a skyhook whose workforce sits this many percent below its own historic peak -- the fingerprint of a hostile den siphoning it.')),
                ('workforce_drop_grace_hours', models.IntegerField(default=24, help_text='Only alert once the drop has persisted this long.')),
                ('adm_alert_threshold', models.FloatField(blank=True, default=3.0, help_text="Warn when a system's ADM falls below this. Blank disables it.", null=True)),
                ('notify_upgrade_offline', models.BooleanField(default=True, help_text='Warn when a sovereignty upgrade drops out for lack of fuel, power or workforce.')),
                ('notify_upgrade_den_caused', models.BooleanField(default=True, help_text='Call it out separately when a den siphoning workforce in the same system is the likely reason an upgrade went down.')),
                ('sov_discord_enabled', models.BooleanField(default=True, help_text='Post sovereignty alerts to Discord.')),
                ('skyhook_theft_lead_minutes', models.IntegerField(default=45, help_text='How long before a theft window opens to warn.')),
                ('skyhook_discord_enabled', models.BooleanField(default=True, help_text='Post skyhook alerts to Discord.')),
                ('notify_den_skyhook_impact', models.BooleanField(default=True, help_text='Warn when a den starts siphoning one of our skyhooks.')),
                ('notify_den_sov_impact', models.BooleanField(default=True, help_text="Warn when a den's siphoning is severe enough to knock a sovereignty upgrade offline.")),
                ('den_discord_enabled', models.BooleanField(default=True, help_text='Post den alerts to Discord.')),
            ],
            options={
                'verbose_name': 'configuration',
                'verbose_name_plural': 'configuration',
            },
        ),
        migrations.CreateModel(
            name='Webhook',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('url', models.CharField(help_text='Discord webhook URL, from Channel Settings > Integrations', max_length=500)),
                ('is_enabled', models.BooleanField(default=True)),
                ('ping_type', models.CharField(choices=[('NN', 'no ping'), ('HE', '@here'), ('EV', '@everyone')], default='NN', max_length=2)),
                ('notes', models.TextField(blank=True)),
            ],
        ),
        migrations.CreateModel(
            name='DenCharacter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_enabled', models.BooleanField(db_index=True, default=True)),
                ('timezone', models.CharField(blank=True, choices=[('AUTZ', 'AUTZ - Australia / New Zealand (UTC+10)'), ('CNTZ', 'CNTZ - China / East Asia (UTC+8)'), ('SEATZ', 'SEATZ - Southeast Asia (UTC+7)'), ('RUTZ', 'RUTZ - Russia / CIS (UTC+3)'), ('EUTZ', 'EUTZ - Continental Europe (UTC+1)'), ('UKTZ', 'UKTZ - UK / Ireland / Portugal (UTC+0)'), ('SATZ', 'SATZ - South America (UTC-3)'), ('USETZ', 'USETZ - US East (UTC-5)'), ('USCTZ', 'USCTZ - US Central (UTC-6)'), ('USWTZ', 'USWTZ - US West (UTC-8)')], help_text='Roughly when you are awake. Shown to den managers so they know when they can reach you.', max_length=8)),
                ('contact_note', models.CharField(blank=True, help_text='Anything else a den manager should know to reach you.', max_length=200)),
                ('last_sync_at', models.DateTimeField(blank=True, null=True)),
                ('last_sync_ok', models.BooleanField(default=False)),
                ('last_error', models.TextField(blank=True)),
                ('character_ownership', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='holdfast_den_character', to='authentication.characterownership')),
            ],
            options={
                'verbose_name': 'den character',
                'ordering': ['character_ownership__character__character_name'],
            },
        ),
        migrations.CreateModel(
            name='DenOperator',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timezone', models.CharField(blank=True, choices=[('AUTZ', 'AUTZ - Australia / New Zealand (UTC+10)'), ('CNTZ', 'CNTZ - China / East Asia (UTC+8)'), ('SEATZ', 'SEATZ - Southeast Asia (UTC+7)'), ('RUTZ', 'RUTZ - Russia / CIS (UTC+3)'), ('EUTZ', 'EUTZ - Continental Europe (UTC+1)'), ('UKTZ', 'UKTZ - UK / Ireland / Portugal (UTC+0)'), ('SATZ', 'SATZ - South America (UTC-3)'), ('USETZ', 'USETZ - US East (UTC-5)'), ('USCTZ', 'USCTZ - US Central (UTC-6)'), ('USWTZ', 'USWTZ - US West (UTC-8)')], help_text='Roughly when you are awake, so den managers know when to expect an answer.', max_length=8)),
                ('contact_note', models.CharField(blank=True, help_text='Anything else a den manager should know to reach you.', max_length=200)),
                ('updated_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='holdfast_den_operator', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'den operator',
            },
        ),
        migrations.CreateModel(
            name='DenSlot',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('hostile_den_recorded', models.BooleanField(default=False, help_text="Someone else's den is sitting here. Recorded by hand.")),
                ('hostile_owner_note', models.CharField(blank=True, help_text='Who owns it, as far as anyone knows.', max_length=200)),
                ('hostile_recorded_at', models.DateTimeField(blank=True, null=True)),
                ('notes', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('hostile_recorded_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'den slot',
                'ordering': ['skyhook__eve_planet__name'],
            },
        ),
        migrations.CreateModel(
            name='DenClaim',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('pending', 'Pending'), ('approved', 'Approved'), ('rejected', 'Rejected'), ('withdrawn', 'Withdrawn')], db_index=True, default='pending', max_length=10)),
                ('note', models.TextField(blank=True, help_text='Why you want it.')),
                ('created_at', models.DateTimeField(db_index=True, default=django.utils.timezone.now)),
                ('decided_at', models.DateTimeField(blank=True, null=True)),
                ('decision_note', models.TextField(blank=True)),
                ('character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='eveonline.evecharacter')),
                ('decided_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='holdfast_den_claims', to=settings.AUTH_USER_MODEL)),
                ('slot', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='claims', to='holdfast.denslot')),
            ],
            options={
                'verbose_name': 'den claim',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='MercenaryDen',
            fields=[
                ('den_id', models.BigIntegerField(primary_key=True, serialize=False)),
                ('type_id', models.BigIntegerField(blank=True, null=True)),
                ('planet_id', models.BigIntegerField(db_index=True)),
                ('skyhook_id', models.BigIntegerField(blank=True, db_index=True, null=True)),
                ('skyhook_corporation_id', models.BigIntegerField(blank=True, null=True)),
                ('state', models.CharField(choices=[('Unspecified', 'Unspecified'), ('Running', 'Running'), ('Paused', 'Paused (reinforced)'), ('Disabled', 'Disabled (owner lost the skill)')], db_index=True, default='Unspecified', max_length=12)),
                ('development_level', models.CharField(choices=[('Unspecified', 'Unspecified'), ('Level0', 'Level 0'), ('Level1', 'Level 1'), ('Level2', 'Level 2'), ('Level3', 'Level 3'), ('Level4', 'Level 4')], default='Unspecified', max_length=12)),
                ('development_amount', models.BigIntegerField(default=0)),
                ('anarchy_level', models.CharField(choices=[('Unspecified', 'Unspecified'), ('Level0', 'Level 0'), ('Level1', 'Level 1'), ('Level2', 'Level 2'), ('Level3', 'Level 3'), ('Level4', 'Level 4')], default='Unspecified', max_length=12)),
                ('anarchy_amount', models.BigIntegerField(default=0)),
                ('infomorphs', models.BigIntegerField(default=0)),
                ('reinforce_end', models.DateTimeField(blank=True, null=True)),
                ('last_seen_at', models.DateTimeField(db_index=True, default=django.utils.timezone.now)),
                ('detail_updated_at', models.DateTimeField(blank=True, db_index=True, null=True)),
                ('den_character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dens', to='holdfast.dencharacter')),
                ('eve_character', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveonline.evecharacter')),
                ('eve_planet', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveuniverse.eveplanet')),
                ('eve_solar_system', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveuniverse.evesolarsystem')),
                ('slot', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dens', to='holdfast.denslot')),
            ],
            options={
                'verbose_name': 'mercenary den',
                'ordering': ['eve_planet__name'],
            },
        ),
        migrations.CreateModel(
            name='DenEvent',
            fields=[
                ('notification_id', models.BigIntegerField(primary_key=True, serialize=False)),
                ('kind', models.CharField(choices=[('MercenaryDenAttacked', 'Under attack'), ('MercenaryDenReinforced', 'Reinforced'), ('MercenaryDenNewMTO', 'New tactical operation')], db_index=True, max_length=32)),
                ('timestamp', models.DateTimeField(db_index=True)),
                ('text', models.TextField(blank=True)),
                ('is_alerted', models.BooleanField(db_index=True, default=False)),
                ('den_character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='events', to='holdfast.dencharacter')),
                ('den', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='events', to='holdfast.mercenaryden')),
            ],
            options={
                'verbose_name': 'den event',
                'ordering': ['-timestamp'],
            },
        ),
        migrations.CreateModel(
            name='MercenaryTacticalOperation',
            fields=[
                ('operation_id', models.CharField(max_length=128, primary_key=True, serialize=False)),
                ('mercenary_den_id', models.BigIntegerField(db_index=True)),
                ('dungeon_type_id', models.BigIntegerField(blank=True, null=True)),
                ('state', models.CharField(choices=[('Unspecified', 'Unspecified'), ('Available', 'Available'), ('Started', 'Started'), ('Completed', 'Completed'), ('Expired', 'Expired'), ('Removed', 'Removed')], db_index=True, default='Unspecified', max_length=12)),
                ('expires', models.DateTimeField(blank=True, db_index=True, null=True)),
                ('updated_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('den', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='operations', to='holdfast.mercenaryden')),
                ('den_character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='operations', to='holdfast.dencharacter')),
                ('eve_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveuniverse.evetype')),
            ],
            options={
                'verbose_name': 'mercenary tactical operation',
                'ordering': ['expires'],
            },
        ),
        migrations.CreateModel(
            name='Owner',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_enabled', models.BooleanField(db_index=True, default=True)),
                ('last_sync_at', models.DateTimeField(blank=True, null=True)),
                ('last_sync_ok', models.BooleanField(default=False)),
                ('last_error', models.TextField(blank=True)),
                ('character_ownership', models.ForeignKey(blank=True, help_text='Character supplying the token. Needs the Station Manager role.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='authentication.characterownership')),
                ('corporation', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='holdfast_owner', to='eveonline.evecorporationinfo')),
            ],
            options={
                'ordering': ['corporation__corporation_name'],
            },
        ),
        migrations.CreateModel(
            name='ReagentThreshold',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type_id', models.BigIntegerField(unique=True)),
                ('min_unsecured', models.BigIntegerField(default=100, help_text='Alert only once a skyhook holds at least this many unsecured units of this reagent.')),
                ('is_enabled', models.BooleanField(default=True, help_text='Uncheck to never alert on this reagent.')),
                ('eve_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveuniverse.evetype')),
            ],
            options={
                'verbose_name': 'reagent alert threshold',
                'ordering': ['eve_type__name', 'type_id'],
            },
        ),
        migrations.CreateModel(
            name='Skyhook',
            fields=[
                ('skyhook_id', models.BigIntegerField(primary_key=True, serialize=False)),
                ('planet_id', models.BigIntegerField(db_index=True)),
                ('is_active', models.BooleanField(default=False)),
                ('effective_workforce', models.BigIntegerField(blank=True, null=True)),
                ('state', models.CharField(choices=[('Unspecified', 'Unspecified'), ('ShieldVulnerable', 'Shield vulnerable'), ('ArmorReinforced', 'Armor reinforced'), ('ArmorVulnerable', 'Armor vulnerable'), ('HullReinforced', 'Hull reinforced'), ('HullVulnerable', 'Hull vulnerable')], default='Unspecified', max_length=20)),
                ('theft_start', models.DateTimeField(blank=True, db_index=True, null=True)),
                ('theft_end', models.DateTimeField(blank=True, null=True)),
                ('reinforce_end', models.DateTimeField(blank=True, db_index=True, null=True)),
                ('workforce_high_water', models.BigIntegerField(blank=True, null=True)),
                ('workforce_dropped_at', models.DateTimeField(blank=True, null=True)),
                ('workforce_siphon_percent', models.FloatField(blank=True, db_index=True, null=True)),
                ('workforce_base', models.BigIntegerField(blank=True, null=True)),
                ('last_seen_at', models.DateTimeField(db_index=True, default=django.utils.timezone.now)),
                ('detail_updated_at', models.DateTimeField(blank=True, db_index=True, null=True)),
                ('eve_planet', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveuniverse.eveplanet')),
                ('eve_solar_system', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveuniverse.evesolarsystem')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='skyhooks', to='holdfast.owner')),
            ],
            options={
                'ordering': ['theft_start'],
            },
        ),
        migrations.AddField(
            model_name='denslot',
            name='skyhook',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='den_slot', to='holdfast.skyhook'),
        ),
        migrations.CreateModel(
            name='SovCampaign',
            fields=[
                ('campaign_id', models.BigIntegerField(primary_key=True, serialize=False)),
                ('structure_id', models.BigIntegerField(db_index=True)),
                ('solar_system_id', models.BigIntegerField(db_index=True)),
                ('constellation_id', models.BigIntegerField(blank=True, null=True)),
                ('event_type', models.CharField(choices=[('ihub_defense', 'Sovereignty hub defence'), ('tcu_defense', 'TCU defence'), ('station_defense', 'Station defence'), ('station_freeport', 'Station freeport')], max_length=20)),
                ('defender_id', models.BigIntegerField(blank=True, db_index=True, null=True)),
                ('defender_score', models.FloatField(blank=True, null=True)),
                ('attackers_score', models.FloatField(blank=True, null=True)),
                ('start_time', models.DateTimeField(db_index=True)),
                ('updated_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('eve_solar_system', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveuniverse.evesolarsystem')),
            ],
            options={
                'verbose_name': 'sovereignty campaign',
                'ordering': ['start_time'],
            },
        ),
        migrations.CreateModel(
            name='SovHub',
            fields=[
                ('hub_id', models.BigIntegerField(primary_key=True, serialize=False)),
                ('solar_system_id', models.BigIntegerField(db_index=True)),
                ('power_available', models.BigIntegerField(default=0)),
                ('power_allocated', models.BigIntegerField(default=0)),
                ('workforce_available', models.BigIntegerField(default=0)),
                ('workforce_allocated', models.BigIntegerField(default=0)),
                ('vulnerability_start', models.DateTimeField(blank=True, null=True)),
                ('vulnerability_end', models.DateTimeField(blank=True, null=True)),
                ('reagent_bay_updated_at', models.DateTimeField(blank=True, null=True)),
                ('fuel_access_list_id', models.BigIntegerField(blank=True, null=True)),
                ('workforce_transport', models.JSONField(blank=True, default=dict)),
                ('fuel_expires_at', models.DateTimeField(blank=True, db_index=True, null=True)),
                ('last_seen_at', models.DateTimeField(db_index=True, default=django.utils.timezone.now)),
                ('detail_updated_at', models.DateTimeField(blank=True, db_index=True, null=True)),
                ('eve_solar_system', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveuniverse.evesolarsystem')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sov_hubs', to='holdfast.owner')),
            ],
            options={
                'verbose_name': 'sovereignty hub',
                'ordering': ['fuel_expires_at'],
            },
        ),
        migrations.CreateModel(
            name='SovSystem',
            fields=[
                ('solar_system_id', models.BigIntegerField(primary_key=True, serialize=False)),
                ('alliance_id', models.BigIntegerField(blank=True, db_index=True, null=True)),
                ('corporation_id', models.BigIntegerField(blank=True, null=True)),
                ('claimed_since', models.DateTimeField(blank=True, null=True)),
                ('is_capital_system', models.BooleanField(default=False)),
                ('activity_defense_multiplier', models.FloatField(blank=True, db_index=True, null=True)),
                ('military_level', models.IntegerField(blank=True, null=True)),
                ('industrial_level', models.IntegerField(blank=True, null=True)),
                ('strategic_level', models.IntegerField(blank=True, null=True)),
                ('hub_id', models.BigIntegerField(blank=True, null=True)),
                ('vulnerability_start', models.DateTimeField(blank=True, null=True)),
                ('vulnerability_end', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('eve_solar_system', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveuniverse.evesolarsystem')),
            ],
            options={
                'verbose_name': 'sovereignty system',
                'ordering': ['activity_defense_multiplier'],
            },
        ),
        migrations.CreateModel(
            name='SystemCostIndex',
            fields=[
                ('solar_system_id', models.BigIntegerField(primary_key=True, serialize=False)),
                ('alliance_id', models.BigIntegerField(blank=True, db_index=True, null=True)),
                ('manufacturing', models.FloatField(blank=True, db_index=True, null=True)),
                ('reaction', models.FloatField(blank=True, db_index=True, null=True)),
                ('copying', models.FloatField(blank=True, null=True)),
                ('invention', models.FloatField(blank=True, null=True)),
                ('researching_time_efficiency', models.FloatField(blank=True, null=True)),
                ('researching_material_efficiency', models.FloatField(blank=True, null=True)),
                ('other_indices', models.JSONField(blank=True, default=dict)),
                ('updated_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('eve_solar_system', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveuniverse.evesolarsystem')),
            ],
            options={
                'verbose_name': 'system cost index',
                'verbose_name_plural': 'system cost indices',
                'ordering': ['manufacturing'],
            },
        ),
        migrations.CreateModel(
            name='AlertRoute',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category', models.CharField(choices=[('sov_fuel', 'Sovereignty: hub fuel'), ('sov_upgrade', 'Sovereignty: upgrade unpowered'), ('sov_adm', 'Sovereignty: ADM below threshold'), ('sov_reinforced', 'Sovereignty: hub reinforced'), ('skyhook_theft', 'Skyhook: theft window opening'), ('skyhook_attack', 'Skyhook: under attack'), ('den_attack', 'Den: under attack'), ('den_reinforced', 'Den: reinforced'), ('den_mto', 'Den: tactical operation available'), ('den_siphon', 'Den: siphoning our workforce')], max_length=32, unique=True)),
                ('is_enabled', models.BooleanField(default=True, help_text='Uncheck to stop this kind of alert entirely.')),
                ('webhooks', models.ManyToManyField(blank=True, help_text='Leave empty to use every enabled webhook.', related_name='routes', to='holdfast.webhook')),
            ],
            options={
                'verbose_name': 'alert route',
                'ordering': ['category'],
            },
        ),
        migrations.CreateModel(
            name='SkyhookReagent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type_id', models.BigIntegerField()),
                ('secured_stock', models.BigIntegerField(default=0)),
                ('unsecured_stock', models.BigIntegerField(default=0)),
                ('last_cycle', models.DateTimeField(blank=True, null=True)),
                ('eve_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveuniverse.evetype')),
                ('skyhook', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reagents', to='holdfast.skyhook')),
            ],
            options={
                'ordering': ['type_id'],
                'constraints': [models.UniqueConstraint(fields=('skyhook', 'type_id'), name='holdfast_skyhook_reagent_unique')],
            },
        ),
        migrations.CreateModel(
            name='SovHubReagent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type_id', models.BigIntegerField()),
                ('amount', models.BigIntegerField(default=0)),
                ('burning_per_hour', models.BigIntegerField(default=0)),
                ('eve_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveuniverse.evetype')),
                ('hub', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reagents', to='holdfast.sovhub')),
            ],
            options={
                'ordering': ['type_id'],
                'constraints': [models.UniqueConstraint(fields=('hub', 'type_id'), name='holdfast_hub_reagent_unique')],
            },
        ),
        migrations.CreateModel(
            name='SovHubUpgrade',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type_id', models.BigIntegerField()),
                ('power_state', models.CharField(choices=[('Unspecified', 'Unspecified'), ('Online', 'Online'), ('Offline', 'Offline'), ('Low', 'Low (out of fuel, power or workforce)'), ('Pending', 'Pending (waiting on startup cost)')], default='Unspecified', max_length=16)),
                ('eve_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='eveuniverse.evetype')),
                ('hub', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='upgrades', to='holdfast.sovhub')),
            ],
            options={
                'ordering': ['type_id'],
                'constraints': [models.UniqueConstraint(fields=('hub', 'type_id'), name='holdfast_hub_upgrade_unique')],
            },
        ),
    ]
