# Generated by Django 3.2.13 on 2022-06-03 08:27

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


class Migration(migrations.Migration):

    dependencies = [
        ("jsondataferret", "0003_auto_20220526_0923"),
    ]

    operations = [
        migrations.CreateModel(
            name="CachedRecordHistory",
            fields=[
                ("id", models.BigAutoField(primary_key=True, serialize=False)),
                ("data", models.JSONField(default=dict)),
                (
                    "event",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="jsondataferret.event",
                    ),
                ),
                (
                    "record",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="jsondataferret.record",
                    ),
                ),
            ],
        ),
        migrations.AddConstraint(
            model_name="cachedrecordhistory",
            constraint=models.UniqueConstraint(
                fields=("record", "event"),
                name="cachedrecordhistory_unique_record_event",
            ),
        ),
    ]
