# Generated by Django 4.2.9 on 2024-02-24 18:39

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):
    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("content_settings", "0002_user_defined"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="contentsetting",
            options={
                "ordering": ("name",),
                "permissions": [("can_preview_on_site", "Can preview on site")],
            },
        ),
        migrations.CreateModel(
            name="UserPreviewHistory",
            fields=[
                (
                    "id",
                    models.AutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("created_on", models.DateTimeField(default=django.utils.timezone.now)),
                ("name", models.CharField(max_length=200)),
                ("value", models.TextField(null=True)),
                (
                    "status",
                    models.IntegerField(
                        choices=[
                            (0, "Created"),
                            (10, "Applied"),
                            (20, "Removed"),
                            (30, "Ignored"),
                        ],
                        default=0,
                    ),
                ),
                (
                    "user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="UserPreview",
            fields=[
                (
                    "id",
                    models.AutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("name", models.CharField(max_length=200)),
                ("from_value", models.TextField()),
                ("value", models.TextField()),
                (
                    "user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "unique_together": {("user", "name")},
            },
        ),
    ]
