# Generated by Django 3.2.7 on 2021-09-05 08:47

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

import plausible.contrib.wagtail.validators


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("wagtailcore", "0062_comment_models_and_pagesubscription"),
    ]

    operations = [
        migrations.CreateModel(
            name="PlausibleSettings",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "site_domain",
                    models.CharField(
                        blank=True,
                        max_length=255,
                    ),
                ),
                (
                    "plausible_domain",
                    models.CharField(
                        blank=True,
                        default="plausible.io",
                        max_length=255,
                    ),
                ),
                (
                    "script_name",
                    models.CharField(
                        default="plausible.js",
                        max_length=255,
                        validators=[
                            plausible.contrib.wagtail.validators.PlausibleScriptNameValidator()
                        ],
                    ),
                ),
                (
                    "site",
                    models.OneToOneField(
                        editable=False,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="wagtailcore.site",
                    ),
                ),
            ],
            options={
                "verbose_name": "Plausible Analytics",
            },
        ),
    ]
