# Generated by Django 5.1.4 on 2024-12-26 22:39

import fieldlogger.encoding
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="FieldLog",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("app_label", models.CharField(editable=False, max_length=100)),
                ("model_name", models.CharField(editable=False, max_length=100)),
                ("instance_id", models.CharField(editable=False, max_length=255)),
                (
                    "field",
                    models.CharField(
                        editable=False, max_length=100, verbose_name="field name"
                    ),
                ),
                ("timestamp", models.DateTimeField(auto_now=True)),
                (
                    "old_value",
                    models.JSONField(
                        blank=True,
                        decoder=fieldlogger.encoding.Decoder,
                        editable=False,
                        encoder=fieldlogger.encoding.Encoder,
                        null=True,
                    ),
                ),
                (
                    "new_value",
                    models.JSONField(
                        blank=True,
                        decoder=fieldlogger.encoding.Decoder,
                        editable=False,
                        encoder=fieldlogger.encoding.Encoder,
                        null=True,
                    ),
                ),
                (
                    "extra_data",
                    models.JSONField(
                        decoder=fieldlogger.encoding.Decoder,
                        default=dict,
                        encoder=fieldlogger.encoding.Encoder,
                    ),
                ),
                ("created", models.BooleanField(default=False, editable=False)),
            ],
        ),
    ]
