# Generated by Django 5.1.1 on 2024-10-03 07:03

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("contenttypes", "0002_remove_content_type_name"),
    ]

    operations = [
        migrations.CreateModel(
            name="Category",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("name", models.CharField(max_length=255, unique=True)),
                ("code", models.SlugField(max_length=255, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name="Configuration",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("name", models.CharField(max_length=255, unique=True)),
                ("code", models.SlugField(max_length=255, unique=True)),
                ("columns", models.TextField(default="")),
                ("exporter", strategy_field.fields.StrategyField()),
                ("headers", models.TextField(blank=True, default="")),
                ("data", models.JSONField(blank=True, default={})),
                ("enabled", models.BooleanField(blank=True, default=False)),
                (
                    "option",
                    models.CharField(choices=[("M", "Memory Safe"), ("T", "Fastest")], default="T", max_length=1),
                ),
                (
                    "max_queries",
                    models.IntegerField(
                        blank=True,
                        default=0,
                        help_text="Max queries expected for this template. Log warning otherwise.",
                        null=True,
                    ),
                ),
                ("categories", models.ManyToManyField(blank=True, to="hope_smart_export.category")),
                (
                    "content_type",
                    models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="contenttypes.contenttype"),
                ),
            ],
        ),
    ]
