From 0d9ff3b771f16bff352e2291174bf543ef0f5b3d Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Thu, 29 Dec 2022 22:18:03 +0100 Subject: [PATCH] Migration --- ...options_alter_snapshot_options_and_more.py | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 nummi/main/migrations/0020_alter_account_options_alter_snapshot_options_and_more.py diff --git a/nummi/main/migrations/0020_alter_account_options_alter_snapshot_options_and_more.py b/nummi/main/migrations/0020_alter_account_options_alter_snapshot_options_and_more.py new file mode 100644 index 0000000..04233eb --- /dev/null +++ b/nummi/main/migrations/0020_alter_account_options_alter_snapshot_options_and_more.py @@ -0,0 +1,141 @@ +# Generated by Django 4.1.4 on 2022-12-29 21:15 + +import datetime +import re + +import django.core.validators +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("main", "0019_snapshot_sum"), + ] + + operations = [ + migrations.AlterModelOptions( + name="account", + options={ + "ordering": ["name"], + "verbose_name": "Compte", + "verbose_name_plural": "Comptes", + }, + ), + migrations.AlterModelOptions( + name="snapshot", + options={ + "ordering": ["-date"], + "verbose_name": "Relevé", + "verbose_name_plural": "Relevés", + }, + ), + migrations.AlterField( + model_name="account", + name="icon", + field=models.CharField( + default="building-columns", + max_length=64, + validators=[ + django.core.validators.RegexValidator( + re.compile("^[-a-zA-Z0-9_]+\\Z"), + "Enter a valid “slug” consisting of letters, numbers, underscores or hyphens.", + "invalid", + ) + ], + verbose_name="Icône", + ), + ), + migrations.AlterField( + model_name="account", + name="name", + field=models.CharField(default="Compte", max_length=64, verbose_name="Nom"), + ), + migrations.AlterField( + model_name="category", + name="icon", + field=models.CharField( + default="folder", + max_length=64, + validators=[ + django.core.validators.RegexValidator( + re.compile("^[-a-zA-Z0-9_]+\\Z"), + "Enter a valid “slug” consisting of letters, numbers, underscores or hyphens.", + "invalid", + ) + ], + verbose_name="Icône", + ), + ), + migrations.AlterField( + model_name="snapshot", + name="account", + field=models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + to="main.account", + verbose_name="Compte", + ), + ), + migrations.AlterField( + model_name="snapshot", + name="date", + field=models.DateField( + default=datetime.date.today, verbose_name="Date de fin" + ), + ), + migrations.AlterField( + model_name="snapshot", + name="start_date", + field=models.DateField( + default=datetime.date.today, verbose_name="Date de début" + ), + ), + migrations.AlterField( + model_name="snapshot", + name="start_value", + field=models.DecimalField( + decimal_places=2, + default=0, + max_digits=12, + verbose_name="Valeur de début", + ), + ), + migrations.AlterField( + model_name="snapshot", + name="sum", + field=models.DecimalField( + decimal_places=2, + default=0, + editable=False, + max_digits=12, + verbose_name="Différence des transactions", + ), + ), + migrations.AlterField( + model_name="snapshot", + name="value", + field=models.DecimalField( + decimal_places=2, default=0, max_digits=12, verbose_name="Valeur de fin" + ), + ), + migrations.AlterField( + model_name="transaction", + name="account", + field=models.ForeignKey( + editable=False, + on_delete=django.db.models.deletion.CASCADE, + to="main.account", + verbose_name="Compte", + ), + ), + migrations.AlterField( + model_name="transaction", + name="snapshot", + field=models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + to="main.snapshot", + verbose_name="Relevé", + ), + ), + ]