# Generated by Django 4.2.26 on 2025-11-17 07:50

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


class Migration(migrations.Migration):

    dependencies = [
        ("taxsystem", "0011_alter_corporationowner_options_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="AllianceFilter",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "filter_type",
                    models.CharField(
                        choices=[("reason", "Reason"), ("amount", "Amount")],
                        max_length=20,
                    ),
                ),
                ("value", models.CharField(max_length=255)),
            ],
            options={
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="AllianceFilterSet",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=100, unique=True)),
                ("description", models.CharField(blank=True, max_length=255)),
                ("enabled", models.BooleanField(default=True)),
            ],
            options={
                "abstract": False,
                "default_permissions": (),
            },
        ),
        migrations.RenameModel(
            old_name="JournalFilter",
            new_name="CorporationFilter",
        ),
        migrations.RenameModel(
            old_name="JournalFilterSet",
            new_name="CorporationFilterSet",
        ),
        migrations.AlterModelOptions(
            name="corporationfilterset",
            options={"default_permissions": ()},
        ),
        migrations.AlterModelOptions(
            name="members",
            options={"default_permissions": ()},
        ),
        migrations.RemoveConstraint(
            model_name="corporationfilter",
            name="unique_filter_value_per_set",
        ),
        migrations.AlterField(
            model_name="corporationupdatestatus",
            name="section",
            field=models.CharField(choices=[], db_index=True, max_length=32),
        ),
        migrations.AddField(
            model_name="alliancefilterset",
            name="owner",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="ts_alliance_filter_set",
                to="taxsystem.allianceowner",
            ),
        ),
        migrations.AddField(
            model_name="alliancefilter",
            name="filter_set",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="ts_alliance_filters",
                to="taxsystem.alliancefilterset",
            ),
        ),
    ]
