# Generated by Django 3.1 on 2020-11-30 14:03

import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion
import xlsx_import_tools.definitions


class Migration(migrations.Migration):

    initial = True

    dependencies = []  # type: ignore

    operations = [
        migrations.CreateModel(
            name="ColumnDefinition",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("col_name", models.SlugField()),
                ("required", models.BooleanField(default=True)),
                (
                    "aliases",
                    django.contrib.postgres.fields.ArrayField(
                        base_field=models.CharField(max_length=128), size=None
                    ),
                ),
            ],
            bases=(models.Model, xlsx_import_tools.definitions.ColumnDefinition),
        ),
        migrations.CreateModel(
            name="SheetDefinition",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("sheet_name", models.SlugField()),
                ("required", models.BooleanField(default=True)),
                (
                    "aliases",
                    django.contrib.postgres.fields.ArrayField(
                        base_field=models.CharField(max_length=128), size=None
                    ),
                ),
                (
                    "columns",
                    models.ManyToManyField(to="xlsx_import_tools.ColumnDefinition"),
                ),
                (
                    "header_definition",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="+",
                        to="xlsx_import_tools.columndefinition",
                    ),
                ),
            ],
        ),
    ]
