""" Migration
"""
# Generated by Django 3.2.10 on 2022-01-28 15:56

import core_main_app.utils.validation.xpath_validation
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):
    """Migration"""

    initial = True

    dependencies = [
        ("core_main_app", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="ElasticsearchTemplate",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title_path", models.CharField(default=None, max_length=400)),
                (
                    "description_paths",
                    models.JSONField(
                        blank=True,
                        default=None,
                        null=True,
                        validators=[
                            core_main_app.utils.validation.xpath_validation.validate_xpath_list
                        ],
                    ),
                ),
                (
                    "template",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="core_main_app.template",
                    ),
                ),
            ],
        ),
    ]
