nummi/nummi/main/migrations/0009_snapshot.py
2022-05-21 21:00:26 +02:00

44 lines
1.2 KiB
Python

# Generated by Django 4.0.4 on 2022-05-21 18:40
import datetime
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
("main", "0008_alter_category_options_category_icon"),
]
operations = [
migrations.CreateModel(
name="Snapshot",
fields=[
(
"id",
models.UUIDField(
default=uuid.uuid4,
editable=False,
primary_key=True,
serialize=False,
),
),
("date", models.DateField(default=datetime.date.today)),
(
"value",
models.DecimalField(decimal_places=2, default=0, max_digits=12),
),
(
"previous",
models.OneToOneField(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="main.snapshot",
),
),
],
),
]