From 4738dffc825cce3694e690e65922570a384d792c Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Thu, 20 Apr 2023 17:27:06 +0200 Subject: [PATCH] Transition squashed migration to normal migration --- nummi/main/migrations/0001_initial.py | 153 --------- ..._alter_account_icon_alter_category_icon.py | 31 -- ...alter_snapshot_date_alter_snapshot_diff.py | 24 -- .../migrations/0003_transaction_real_date.py | 17 - .../migrations/0004_transaction_payment.py | 17 - .../migrations/0005_alter_category_name.py | 17 - ..._options_alter_invoice_options_and_more.py | 145 --------- ..._alter_invoice_file_alter_snapshot_date.py | 44 --- .../migrations/0008_auto_20221221_1657.py | 15 - ...file_alter_invoice_transaction_and_more.py | 46 --- ...ser_invoice_user_snapshot_user_and_more.py | 59 ---- ...tegory_user_alter_invoice_user_and_more.py | 55 ---- .../migrations/0012_alter_snapshot_date.py | 19 -- ...nt_snapshot_account_transaction_account.py | 79 ----- .../migrations/0014_alter_account_icon.py | 19 -- ...t_options_remove_snapshot_diff_and_more.py | 70 ----- ...tion_account_alter_transaction_snapshot.py | 45 --- .../0017_alter_transaction_account.py | 44 --- ...18_snapshot_diff_alter_snapshot_account.py | 33 -- nummi/main/migrations/0019_snapshot_sum.py | 23 -- ...options_alter_snapshot_options_and_more.py | 140 --------- ...options_alter_category_options_and_more.py | 295 ------------------ ..._alter_account_icon_alter_category_icon.py | 26 -- .../migrations/0023_auto_20221231_1741.py | 55 ---- nummi/main/migrations/0024_account_default.py | 17 - ..._options_alter_invoice_options_and_more.py | 66 ---- ...lter_account_uicon_alter_category_uicon.py | 22 -- ...nt_uicon_remove_category_uicon_and_more.py | 32 -- ..._alter_account_icon_alter_category_icon.py | 24 -- 29 files changed, 1632 deletions(-) delete mode 100644 nummi/main/migrations/0001_initial.py delete mode 100644 nummi/main/migrations/0002_alter_snapshot_date_alter_snapshot_diff.py delete mode 100644 nummi/main/migrations/0003_transaction_real_date.py delete mode 100644 nummi/main/migrations/0004_transaction_payment.py delete mode 100644 nummi/main/migrations/0005_alter_category_name.py delete mode 100644 nummi/main/migrations/0006_alter_category_options_alter_invoice_options_and_more.py delete mode 100644 nummi/main/migrations/0007_snapshot_file_alter_invoice_file_alter_snapshot_date.py delete mode 100644 nummi/main/migrations/0008_auto_20221221_1657.py delete mode 100644 nummi/main/migrations/0009_alter_invoice_file_alter_invoice_transaction_and_more.py delete mode 100644 nummi/main/migrations/0010_category_user_invoice_user_snapshot_user_and_more.py delete mode 100644 nummi/main/migrations/0011_alter_category_user_alter_invoice_user_and_more.py delete mode 100644 nummi/main/migrations/0012_alter_snapshot_date.py delete mode 100644 nummi/main/migrations/0013_account_snapshot_account_transaction_account.py delete mode 100644 nummi/main/migrations/0014_alter_account_icon.py delete mode 100644 nummi/main/migrations/0015_alter_snapshot_options_remove_snapshot_diff_and_more.py delete mode 100644 nummi/main/migrations/0016_alter_transaction_account_alter_transaction_snapshot.py delete mode 100644 nummi/main/migrations/0017_alter_transaction_account.py delete mode 100644 nummi/main/migrations/0018_snapshot_diff_alter_snapshot_account.py delete mode 100644 nummi/main/migrations/0019_snapshot_sum.py delete mode 100644 nummi/main/migrations/0020_alter_account_options_alter_snapshot_options_and_more.py delete mode 100644 nummi/main/migrations/0021_alter_account_options_alter_category_options_and_more.py delete mode 100644 nummi/main/migrations/0022_alter_account_icon_alter_category_icon.py delete mode 100644 nummi/main/migrations/0023_auto_20221231_1741.py delete mode 100644 nummi/main/migrations/0024_account_default.py delete mode 100644 nummi/main/migrations/0025_alter_account_options_alter_invoice_options_and_more.py delete mode 100644 nummi/main/migrations/0026_alter_account_uicon_alter_category_uicon.py delete mode 100644 nummi/main/migrations/0027_remove_account_uicon_remove_category_uicon_and_more.py delete mode 100644 nummi/main/migrations/0028_alter_account_icon_alter_category_icon.py diff --git a/nummi/main/migrations/0001_initial.py b/nummi/main/migrations/0001_initial.py deleted file mode 100644 index c6dcd3e..0000000 --- a/nummi/main/migrations/0001_initial.py +++ /dev/null @@ -1,153 +0,0 @@ -# Generated by Django 4.0.4 on 2022-05-22 07:45 - -import datetime -import re -import uuid - -import django.core.validators -import django.db.models.deletion -from django.db import migrations, models - - -class Migration(migrations.Migration): - initial = True - - dependencies = [] - - operations = [ - migrations.CreateModel( - name="Category", - fields=[ - ( - "id", - models.UUIDField( - default=uuid.uuid4, - editable=False, - primary_key=True, - serialize=False, - ), - ), - ( - "name", - models.CharField( - default="New Category", - max_length=64, - validators=[ - django.core.validators.RegexValidator( - re.compile("^[-\\w]+\\Z"), - "Enter a valid “slug” consisting of Unicode letters, numbers, underscores, or hyphens.", - "invalid", - ) - ], - ), - ), - ("icon", models.CharField(default="folder", max_length=64)), - ], - options={ - "ordering": ["name"], - }, - ), - migrations.CreateModel( - name="Transaction", - fields=[ - ( - "id", - models.UUIDField( - default=uuid.uuid4, - editable=False, - primary_key=True, - serialize=False, - ), - ), - ("name", models.CharField(default="New Transaction", max_length=256)), - ("description", models.TextField(blank=True, null=True)), - ( - "value", - models.DecimalField(decimal_places=2, default=0, max_digits=12), - ), - ("date", models.DateField(default=datetime.date.today)), - ("trader", models.CharField(blank=True, max_length=128, null=True)), - ( - "category", - models.ForeignKey( - blank=True, - null=True, - on_delete=django.db.models.deletion.SET_NULL, - to="main.category", - ), - ), - ], - options={ - "ordering": ["-date"], - }, - ), - 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, unique=True)), - ( - "value", - models.DecimalField(decimal_places=2, default=0, max_digits=12), - ), - ( - "diff", - models.DecimalField( - decimal_places=2, default=0, editable=False, max_digits=12 - ), - ), - ( - "previous", - models.OneToOneField( - blank=True, - editable=False, - null=True, - on_delete=django.db.models.deletion.SET_NULL, - to="main.snapshot", - ), - ), - ], - options={ - "ordering": ["-date"], - }, - ), - migrations.CreateModel( - name="Invoice", - fields=[ - ( - "id", - models.UUIDField( - default=uuid.uuid4, - editable=False, - primary_key=True, - serialize=False, - ), - ), - ("name", models.CharField(default="New Invoice", max_length=256)), - ( - "file", - models.FileField( - upload_to="invoices/", - validators=[ - django.core.validators.FileExtensionValidator(["pdf"]) - ], - ), - ), - ( - "transaction", - models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, - to="main.transaction", - ), - ), - ], - ), - ] diff --git a/nummi/main/migrations/0001_squashed_0028_alter_account_icon_alter_category_icon.py b/nummi/main/migrations/0001_squashed_0028_alter_account_icon_alter_category_icon.py index 8fc3812..7674210 100644 --- a/nummi/main/migrations/0001_squashed_0028_alter_account_icon_alter_category_icon.py +++ b/nummi/main/migrations/0001_squashed_0028_alter_account_icon_alter_category_icon.py @@ -13,37 +13,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - replaces = [ - ("main", "0001_initial"), - ("main", "0002_alter_snapshot_date_alter_snapshot_diff"), - ("main", "0003_transaction_real_date"), - ("main", "0004_transaction_payment"), - ("main", "0005_alter_category_name"), - ("main", "0006_alter_category_options_alter_invoice_options_and_more"), - ("main", "0007_snapshot_file_alter_invoice_file_alter_snapshot_date"), - ("main", "0008_auto_20221221_1657"), - ("main", "0009_alter_invoice_file_alter_invoice_transaction_and_more"), - ("main", "0010_category_user_invoice_user_snapshot_user_and_more"), - ("main", "0011_alter_category_user_alter_invoice_user_and_more"), - ("main", "0012_alter_snapshot_date"), - ("main", "0013_account_snapshot_account_transaction_account"), - ("main", "0014_alter_account_icon"), - ("main", "0015_alter_snapshot_options_remove_snapshot_diff_and_more"), - ("main", "0016_alter_transaction_account_alter_transaction_snapshot"), - ("main", "0017_alter_transaction_account"), - ("main", "0018_snapshot_diff_alter_snapshot_account"), - ("main", "0019_snapshot_sum"), - ("main", "0020_alter_account_options_alter_snapshot_options_and_more"), - ("main", "0021_alter_account_options_alter_category_options_and_more"), - ("main", "0022_alter_account_icon_alter_category_icon"), - ("main", "0023_auto_20221231_1741"), - ("main", "0024_account_default"), - ("main", "0025_alter_account_options_alter_invoice_options_and_more"), - ("main", "0026_alter_account_uicon_alter_category_uicon"), - ("main", "0027_remove_account_uicon_remove_category_uicon_and_more"), - ("main", "0028_alter_account_icon_alter_category_icon"), - ] - initial = True dependencies = [ diff --git a/nummi/main/migrations/0002_alter_snapshot_date_alter_snapshot_diff.py b/nummi/main/migrations/0002_alter_snapshot_date_alter_snapshot_diff.py deleted file mode 100644 index e1cf52e..0000000 --- a/nummi/main/migrations/0002_alter_snapshot_date_alter_snapshot_diff.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 4.0.4 on 2022-05-22 09:15 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0001_initial"), - ] - - operations = [ - migrations.AlterField( - model_name="snapshot", - name="date", - field=models.DateField(unique=True), - ), - migrations.AlterField( - model_name="snapshot", - name="diff", - field=models.DecimalField( - blank=True, decimal_places=2, editable=False, max_digits=12, null=True - ), - ), - ] diff --git a/nummi/main/migrations/0003_transaction_real_date.py b/nummi/main/migrations/0003_transaction_real_date.py deleted file mode 100644 index ba6c620..0000000 --- a/nummi/main/migrations/0003_transaction_real_date.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 4.0.4 on 2022-05-22 11:35 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0002_alter_snapshot_date_alter_snapshot_diff"), - ] - - operations = [ - migrations.AddField( - model_name="transaction", - name="real_date", - field=models.DateField(blank=True, null=True), - ), - ] diff --git a/nummi/main/migrations/0004_transaction_payment.py b/nummi/main/migrations/0004_transaction_payment.py deleted file mode 100644 index 58f807f..0000000 --- a/nummi/main/migrations/0004_transaction_payment.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 4.0.4 on 2022-05-22 11:51 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0003_transaction_real_date"), - ] - - operations = [ - migrations.AddField( - model_name="transaction", - name="payment", - field=models.CharField(blank=True, max_length=128, null=True), - ), - ] diff --git a/nummi/main/migrations/0005_alter_category_name.py b/nummi/main/migrations/0005_alter_category_name.py deleted file mode 100644 index 58eb9cf..0000000 --- a/nummi/main/migrations/0005_alter_category_name.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 4.0.4 on 2022-05-22 11:56 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0004_transaction_payment"), - ] - - operations = [ - migrations.AlterField( - model_name="category", - name="name", - field=models.CharField(default="New Category", max_length=64), - ), - ] diff --git a/nummi/main/migrations/0006_alter_category_options_alter_invoice_options_and_more.py b/nummi/main/migrations/0006_alter_category_options_alter_invoice_options_and_more.py deleted file mode 100644 index 0e01761..0000000 --- a/nummi/main/migrations/0006_alter_category_options_alter_invoice_options_and_more.py +++ /dev/null @@ -1,145 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-20 14:26 - -import datetime - -import django.core.validators -import django.db.models.deletion -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0005_alter_category_name"), - ] - - operations = [ - migrations.AlterModelOptions( - name="category", - options={ - "ordering": ["name"], - "verbose_name": "Catégorie", - "verbose_name_plural": "Catégories", - }, - ), - migrations.AlterModelOptions( - name="invoice", - options={"verbose_name": "Facture", "verbose_name_plural": "Factures"}, - ), - migrations.AlterModelOptions( - name="snapshot", - options={ - "ordering": ["-date"], - "verbose_name": "Relevé", - "verbose_name_plural": "Relevés", - }, - ), - migrations.AlterModelOptions( - name="transaction", - options={ - "ordering": ["-date"], - "verbose_name": "Transaction", - "verbose_name_plural": "Transactions", - }, - ), - migrations.AddField( - model_name="category", - name="budget", - field=models.BooleanField(default=True, verbose_name="Budget"), - ), - migrations.AlterField( - model_name="category", - name="icon", - field=models.CharField( - default="folder", max_length=64, verbose_name="Icône" - ), - ), - migrations.AlterField( - model_name="category", - name="name", - field=models.CharField( - default="Catégorie", max_length=64, verbose_name="Nom" - ), - ), - migrations.AlterField( - model_name="invoice", - name="file", - field=models.FileField( - upload_to="invoices/", - validators=[django.core.validators.FileExtensionValidator(["pdf"])], - verbose_name="Fichier", - ), - ), - migrations.AlterField( - model_name="invoice", - name="name", - field=models.CharField( - default="Facture", max_length=256, verbose_name="Nom" - ), - ), - migrations.AlterField( - model_name="snapshot", - name="date", - field=models.DateField(unique=True, verbose_name="Date"), - ), - migrations.AlterField( - model_name="snapshot", - name="value", - field=models.DecimalField( - decimal_places=2, default=0, max_digits=12, verbose_name="Valeur" - ), - ), - migrations.AlterField( - model_name="transaction", - name="category", - field=models.ForeignKey( - blank=True, - null=True, - on_delete=django.db.models.deletion.SET_NULL, - to="main.category", - verbose_name="Catégorie", - ), - ), - migrations.AlterField( - model_name="transaction", - name="date", - field=models.DateField(default=datetime.date.today, verbose_name="Date"), - ), - migrations.AlterField( - model_name="transaction", - name="description", - field=models.TextField(blank=True, null=True, verbose_name="Description"), - ), - migrations.AlterField( - model_name="transaction", - name="name", - field=models.CharField( - default="Transaction", max_length=256, verbose_name="Nom" - ), - ), - migrations.AlterField( - model_name="transaction", - name="payment", - field=models.CharField( - blank=True, max_length=128, null=True, verbose_name="Paiement" - ), - ), - migrations.AlterField( - model_name="transaction", - name="real_date", - field=models.DateField(blank=True, null=True, verbose_name="Date réelle"), - ), - migrations.AlterField( - model_name="transaction", - name="trader", - field=models.CharField( - blank=True, max_length=128, null=True, verbose_name="Commerçant" - ), - ), - migrations.AlterField( - model_name="transaction", - name="value", - field=models.DecimalField( - decimal_places=2, default=0, max_digits=12, verbose_name="Valeur" - ), - ), - ] diff --git a/nummi/main/migrations/0007_snapshot_file_alter_invoice_file_alter_snapshot_date.py b/nummi/main/migrations/0007_snapshot_file_alter_invoice_file_alter_snapshot_date.py deleted file mode 100644 index ae9f88a..0000000 --- a/nummi/main/migrations/0007_snapshot_file_alter_invoice_file_alter_snapshot_date.py +++ /dev/null @@ -1,44 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-21 08:53 - -import datetime - -import django.core.validators -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0006_alter_category_options_alter_invoice_options_and_more"), - ] - - operations = [ - migrations.AddField( - model_name="snapshot", - name="file", - field=models.FileField( - blank=True, - max_length=128, - null=True, - upload_to="snapshots/", - validators=[django.core.validators.FileExtensionValidator(["pdf"])], - verbose_name="Fichier", - ), - ), - migrations.AlterField( - model_name="invoice", - name="file", - field=models.FileField( - max_length=128, - upload_to="invoices/", - validators=[django.core.validators.FileExtensionValidator(["pdf"])], - verbose_name="Fichier", - ), - ), - migrations.AlterField( - model_name="snapshot", - name="date", - field=models.DateField( - default=datetime.date.today, unique=True, verbose_name="Date" - ), - ), - ] diff --git a/nummi/main/migrations/0008_auto_20221221_1657.py b/nummi/main/migrations/0008_auto_20221221_1657.py deleted file mode 100644 index d4329b0..0000000 --- a/nummi/main/migrations/0008_auto_20221221_1657.py +++ /dev/null @@ -1,15 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-21 15:57 - -from django.contrib.postgres.operations import TrigramExtension, UnaccentExtension -from django.db import migrations - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0007_snapshot_file_alter_invoice_file_alter_snapshot_date"), - ] - - operations = [ - TrigramExtension(), - UnaccentExtension(), - ] diff --git a/nummi/main/migrations/0009_alter_invoice_file_alter_invoice_transaction_and_more.py b/nummi/main/migrations/0009_alter_invoice_file_alter_invoice_transaction_and_more.py deleted file mode 100644 index bcd7bb8..0000000 --- a/nummi/main/migrations/0009_alter_invoice_file_alter_invoice_transaction_and_more.py +++ /dev/null @@ -1,46 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-28 11:20 - -import django.core.validators -import django.db.models.deletion -import main.models -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0008_auto_20221221_1657"), - ] - - operations = [ - migrations.AlterField( - model_name="invoice", - name="file", - field=models.FileField( - max_length=128, - upload_to=main.models.get_path, - validators=[django.core.validators.FileExtensionValidator(["pdf"])], - verbose_name="Fichier", - ), - ), - migrations.AlterField( - model_name="invoice", - name="transaction", - field=models.ForeignKey( - editable=False, - on_delete=django.db.models.deletion.CASCADE, - to="main.transaction", - ), - ), - migrations.AlterField( - model_name="snapshot", - name="file", - field=models.FileField( - blank=True, - default="", - max_length=256, - upload_to=main.models.get_path, - validators=[django.core.validators.FileExtensionValidator(["pdf"])], - verbose_name="Fichier", - ), - ), - ] diff --git a/nummi/main/migrations/0010_category_user_invoice_user_snapshot_user_and_more.py b/nummi/main/migrations/0010_category_user_invoice_user_snapshot_user_and_more.py deleted file mode 100644 index 35d701e..0000000 --- a/nummi/main/migrations/0010_category_user_invoice_user_snapshot_user_and_more.py +++ /dev/null @@ -1,59 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-29 18:03 - -import django.db.models.deletion -from django.conf import settings -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ("main", "0009_alter_invoice_file_alter_invoice_transaction_and_more"), - ] - - operations = [ - migrations.AddField( - model_name="category", - name="user", - field=models.ForeignKey( - default=1, - on_delete=django.db.models.deletion.CASCADE, - to=settings.AUTH_USER_MODEL, - verbose_name="Utilisateur", - ), - preserve_default=False, - ), - migrations.AddField( - model_name="invoice", - name="user", - field=models.ForeignKey( - default=1, - on_delete=django.db.models.deletion.CASCADE, - to=settings.AUTH_USER_MODEL, - verbose_name="Utilisateur", - ), - preserve_default=False, - ), - migrations.AddField( - model_name="snapshot", - name="user", - field=models.ForeignKey( - default=1, - on_delete=django.db.models.deletion.CASCADE, - to=settings.AUTH_USER_MODEL, - verbose_name="Utilisateur", - ), - preserve_default=False, - ), - migrations.AddField( - model_name="transaction", - name="user", - field=models.ForeignKey( - default=1, - on_delete=django.db.models.deletion.CASCADE, - to=settings.AUTH_USER_MODEL, - verbose_name="Utilisateur", - ), - preserve_default=False, - ), - ] diff --git a/nummi/main/migrations/0011_alter_category_user_alter_invoice_user_and_more.py b/nummi/main/migrations/0011_alter_category_user_alter_invoice_user_and_more.py deleted file mode 100644 index b1743b5..0000000 --- a/nummi/main/migrations/0011_alter_category_user_alter_invoice_user_and_more.py +++ /dev/null @@ -1,55 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-29 18:14 - -import django.db.models.deletion -from django.conf import settings -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ("main", "0010_category_user_invoice_user_snapshot_user_and_more"), - ] - - operations = [ - migrations.AlterField( - model_name="category", - name="user", - field=models.ForeignKey( - editable=False, - on_delete=django.db.models.deletion.CASCADE, - to=settings.AUTH_USER_MODEL, - verbose_name="Utilisateur", - ), - ), - migrations.AlterField( - model_name="invoice", - name="user", - field=models.ForeignKey( - editable=False, - on_delete=django.db.models.deletion.CASCADE, - to=settings.AUTH_USER_MODEL, - verbose_name="Utilisateur", - ), - ), - migrations.AlterField( - model_name="snapshot", - name="user", - field=models.ForeignKey( - editable=False, - on_delete=django.db.models.deletion.CASCADE, - to=settings.AUTH_USER_MODEL, - verbose_name="Utilisateur", - ), - ), - migrations.AlterField( - model_name="transaction", - name="user", - field=models.ForeignKey( - editable=False, - on_delete=django.db.models.deletion.CASCADE, - to=settings.AUTH_USER_MODEL, - verbose_name="Utilisateur", - ), - ), - ] diff --git a/nummi/main/migrations/0012_alter_snapshot_date.py b/nummi/main/migrations/0012_alter_snapshot_date.py deleted file mode 100644 index c702f8c..0000000 --- a/nummi/main/migrations/0012_alter_snapshot_date.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-29 18:22 - -import datetime - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0011_alter_category_user_alter_invoice_user_and_more"), - ] - - operations = [ - migrations.AlterField( - model_name="snapshot", - name="date", - field=models.DateField(default=datetime.date.today, verbose_name="Date"), - ), - ] diff --git a/nummi/main/migrations/0013_account_snapshot_account_transaction_account.py b/nummi/main/migrations/0013_account_snapshot_account_transaction_account.py deleted file mode 100644 index 3568270..0000000 --- a/nummi/main/migrations/0013_account_snapshot_account_transaction_account.py +++ /dev/null @@ -1,79 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-29 18:32 - -import uuid - -import django.db.models.deletion -from django.conf import settings -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ("main", "0012_alter_snapshot_date"), - ] - - operations = [ - migrations.CreateModel( - name="Account", - fields=[ - ( - "id", - models.UUIDField( - default=uuid.uuid4, - editable=False, - primary_key=True, - serialize=False, - ), - ), - ( - "name", - models.CharField( - default="Account", max_length=64, verbose_name="Nom" - ), - ), - ( - "icon", - models.CharField( - default="folder", max_length=64, verbose_name="Icône" - ), - ), - ( - "user", - models.ForeignKey( - editable=False, - on_delete=django.db.models.deletion.CASCADE, - to=settings.AUTH_USER_MODEL, - verbose_name="Utilisateur", - ), - ), - ], - options={ - "verbose_name": "Account", - "verbose_name_plural": "Accounts", - "ordering": ["name"], - }, - ), - migrations.AddField( - model_name="snapshot", - name="account", - field=models.ForeignKey( - blank=True, - null=True, - on_delete=django.db.models.deletion.SET_NULL, - to="main.account", - verbose_name="Account", - ), - ), - migrations.AddField( - model_name="transaction", - name="account", - field=models.ForeignKey( - blank=True, - null=True, - on_delete=django.db.models.deletion.SET_NULL, - to="main.account", - verbose_name="Account", - ), - ), - ] diff --git a/nummi/main/migrations/0014_alter_account_icon.py b/nummi/main/migrations/0014_alter_account_icon.py deleted file mode 100644 index 0af2113..0000000 --- a/nummi/main/migrations/0014_alter_account_icon.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-29 20:05 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0013_account_snapshot_account_transaction_account"), - ] - - operations = [ - migrations.AlterField( - model_name="account", - name="icon", - field=models.CharField( - default="building-columns", max_length=64, verbose_name="Icône" - ), - ), - ] diff --git a/nummi/main/migrations/0015_alter_snapshot_options_remove_snapshot_diff_and_more.py b/nummi/main/migrations/0015_alter_snapshot_options_remove_snapshot_diff_and_more.py deleted file mode 100644 index 6507b6e..0000000 --- a/nummi/main/migrations/0015_alter_snapshot_options_remove_snapshot_diff_and_more.py +++ /dev/null @@ -1,70 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-29 20:26 - -import datetime - -import django.db.models.deletion -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0014_alter_account_icon"), - ] - - operations = [ - migrations.AlterModelOptions( - name="snapshot", - options={ - "ordering": ["-date"], - "verbose_name": "Statement", - "verbose_name_plural": "Statements", - }, - ), - migrations.RemoveField( - model_name="snapshot", - name="diff", - ), - migrations.RemoveField( - model_name="snapshot", - name="previous", - ), - migrations.AddField( - model_name="snapshot", - name="start_date", - field=models.DateField( - default=datetime.date.today, verbose_name="Start date" - ), - ), - migrations.AddField( - model_name="snapshot", - name="start_value", - field=models.DecimalField( - decimal_places=2, default=0, max_digits=12, verbose_name="Start value" - ), - ), - migrations.AddField( - model_name="transaction", - name="snapshot", - field=models.ForeignKey( - blank=True, - null=True, - on_delete=django.db.models.deletion.SET_NULL, - to="main.snapshot", - verbose_name="Statement", - ), - ), - migrations.AlterField( - model_name="snapshot", - name="date", - field=models.DateField( - default=datetime.date.today, verbose_name="End date" - ), - ), - migrations.AlterField( - model_name="snapshot", - name="value", - field=models.DecimalField( - decimal_places=2, default=0, max_digits=12, verbose_name="End value" - ), - ), - ] diff --git a/nummi/main/migrations/0016_alter_transaction_account_alter_transaction_snapshot.py b/nummi/main/migrations/0016_alter_transaction_account_alter_transaction_snapshot.py deleted file mode 100644 index 76d037f..0000000 --- a/nummi/main/migrations/0016_alter_transaction_account_alter_transaction_snapshot.py +++ /dev/null @@ -1,45 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-29 20:32 - -import django.db.models.deletion -from django.db import migrations, models - - -def set_snapshot(apps, schema_editor): - Transaction = apps.get_model("main", "Transaction") - Snapshot = apps.get_model("main", "Snapshot") - for transaction in Transaction.objects.filter(snapshot__isnull=True): - transaction.snapshot = ( - Snapshot.objects.filter(user=transaction.user).order_by("-date").first() - ) - transaction.save() - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0015_alter_snapshot_options_remove_snapshot_diff_and_more"), - ] - - operations = [ - migrations.AlterField( - model_name="transaction", - name="account", - field=models.ForeignKey( - blank=True, - editable=False, - null=True, - on_delete=django.db.models.deletion.SET_NULL, - to="main.account", - verbose_name="Account", - ), - ), - migrations.RunPython(set_snapshot), - migrations.AlterField( - model_name="transaction", - name="snapshot", - field=models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, - to="main.snapshot", - verbose_name="Statement", - ), - ), - ] diff --git a/nummi/main/migrations/0017_alter_transaction_account.py b/nummi/main/migrations/0017_alter_transaction_account.py deleted file mode 100644 index e8f1385..0000000 --- a/nummi/main/migrations/0017_alter_transaction_account.py +++ /dev/null @@ -1,44 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-29 20:34 - -import django.db.models.deletion -from django.db import migrations, models - - -def set_account(apps, schema_editor): - Transaction = apps.get_model("main", "Transaction") - Snapshot = apps.get_model("main", "Snapshot") - Account = apps.get_model("main", "Account") - for snapshot in Snapshot.objects.filter(account__isnull=True): - account = Account.objects.filter(user=snapshot.user).first() - if account is None: - account = Account(user=snapshot.user) - account.save() - snapshot.account = account - snapshot.save() - for transaction in Transaction.objects.filter( - account__isnull=True, snapshot__isnull=False - ): - transaction.account = transaction.snapshot.account - transaction.save() - - -class Migration(migrations.Migration): - atomic = False - - dependencies = [ - ("main", "0016_alter_transaction_account_alter_transaction_snapshot"), - ] - - operations = [ - migrations.RunPython(set_account, atomic=True), - migrations.AlterField( - model_name="transaction", - name="account", - field=models.ForeignKey( - editable=False, - on_delete=django.db.models.deletion.CASCADE, - to="main.account", - verbose_name="Account", - ), - ), - ] diff --git a/nummi/main/migrations/0018_snapshot_diff_alter_snapshot_account.py b/nummi/main/migrations/0018_snapshot_diff_alter_snapshot_account.py deleted file mode 100644 index bd4a699..0000000 --- a/nummi/main/migrations/0018_snapshot_diff_alter_snapshot_account.py +++ /dev/null @@ -1,33 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-29 20:56 - -import django.db.models.deletion -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0017_alter_transaction_account"), - ] - - operations = [ - migrations.AddField( - model_name="snapshot", - name="diff", - field=models.DecimalField( - decimal_places=2, - default=0, - editable=False, - max_digits=12, - verbose_name="Différence", - ), - ), - migrations.AlterField( - model_name="snapshot", - name="account", - field=models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, - to="main.account", - verbose_name="Account", - ), - ), - ] diff --git a/nummi/main/migrations/0019_snapshot_sum.py b/nummi/main/migrations/0019_snapshot_sum.py deleted file mode 100644 index 01de184..0000000 --- a/nummi/main/migrations/0019_snapshot_sum.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-29 20:57 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0018_snapshot_diff_alter_snapshot_account"), - ] - - operations = [ - migrations.AddField( - model_name="snapshot", - name="sum", - field=models.DecimalField( - decimal_places=2, - default=0, - editable=False, - max_digits=12, - verbose_name="Transaction difference", - ), - ), - ] 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 deleted file mode 100644 index 4939143..0000000 --- a/nummi/main/migrations/0020_alter_account_options_alter_snapshot_options_and_more.py +++ /dev/null @@ -1,140 +0,0 @@ -# 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é", - ), - ), - ] diff --git a/nummi/main/migrations/0021_alter_account_options_alter_category_options_and_more.py b/nummi/main/migrations/0021_alter_account_options_alter_category_options_and_more.py deleted file mode 100644 index e428be0..0000000 --- a/nummi/main/migrations/0021_alter_account_options_alter_category_options_and_more.py +++ /dev/null @@ -1,295 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-31 08:51 - -import datetime -import re - -import django.core.validators -import django.db.models.deletion -import main.models -from django.conf import settings -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ("main", "0020_alter_account_options_alter_snapshot_options_and_more"), - ] - - operations = [ - migrations.AlterModelOptions( - name="account", - options={ - "ordering": ["name"], - "verbose_name": "Account", - "verbose_name_plural": "Accounts", - }, - ), - migrations.AlterModelOptions( - name="category", - options={ - "ordering": ["name"], - "verbose_name": "Category", - "verbose_name_plural": "Categories", - }, - ), - migrations.AlterModelOptions( - name="invoice", - options={"verbose_name": "Invoice", "verbose_name_plural": "Invoices"}, - ), - migrations.AlterModelOptions( - name="snapshot", - options={ - "ordering": ["-date"], - "verbose_name": "Statement", - "verbose_name_plural": "Statements", - }, - ), - 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="Icon", - ), - ), - migrations.AlterField( - model_name="account", - name="name", - field=models.CharField( - default="Account", max_length=64, verbose_name="Name" - ), - ), - migrations.AlterField( - model_name="account", - name="user", - field=models.ForeignKey( - editable=False, - on_delete=django.db.models.deletion.CASCADE, - to=settings.AUTH_USER_MODEL, - verbose_name="User", - ), - ), - 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="Icon", - ), - ), - migrations.AlterField( - model_name="category", - name="name", - field=models.CharField( - default="Category", max_length=64, verbose_name="Name" - ), - ), - migrations.AlterField( - model_name="category", - name="user", - field=models.ForeignKey( - editable=False, - on_delete=django.db.models.deletion.CASCADE, - to=settings.AUTH_USER_MODEL, - verbose_name="User", - ), - ), - migrations.AlterField( - model_name="invoice", - name="file", - field=models.FileField( - max_length=128, - upload_to=main.models.get_path, - validators=[django.core.validators.FileExtensionValidator(["pdf"])], - verbose_name="File", - ), - ), - migrations.AlterField( - model_name="invoice", - name="name", - field=models.CharField( - default="Invoice", max_length=256, verbose_name="Name" - ), - ), - migrations.AlterField( - model_name="invoice", - name="user", - field=models.ForeignKey( - editable=False, - on_delete=django.db.models.deletion.CASCADE, - to=settings.AUTH_USER_MODEL, - verbose_name="User", - ), - ), - migrations.AlterField( - model_name="snapshot", - name="account", - field=models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, - to="main.account", - verbose_name="Account", - ), - ), - migrations.AlterField( - model_name="snapshot", - name="date", - field=models.DateField( - default=datetime.date.today, verbose_name="End date" - ), - ), - migrations.AlterField( - model_name="snapshot", - name="diff", - field=models.DecimalField( - decimal_places=2, - default=0, - editable=False, - max_digits=12, - verbose_name="Difference", - ), - ), - migrations.AlterField( - model_name="snapshot", - name="file", - field=models.FileField( - blank=True, - default="", - max_length=256, - upload_to=main.models.get_path, - validators=[django.core.validators.FileExtensionValidator(["pdf"])], - verbose_name="File", - ), - ), - migrations.AlterField( - model_name="snapshot", - name="start_date", - field=models.DateField( - default=datetime.date.today, verbose_name="Start date" - ), - ), - migrations.AlterField( - model_name="snapshot", - name="start_value", - field=models.DecimalField( - decimal_places=2, default=0, max_digits=12, verbose_name="Start value" - ), - ), - migrations.AlterField( - model_name="snapshot", - name="sum", - field=models.DecimalField( - decimal_places=2, - default=0, - editable=False, - max_digits=12, - verbose_name="Transaction difference", - ), - ), - migrations.AlterField( - model_name="snapshot", - name="user", - field=models.ForeignKey( - editable=False, - on_delete=django.db.models.deletion.CASCADE, - to=settings.AUTH_USER_MODEL, - verbose_name="User", - ), - ), - migrations.AlterField( - model_name="snapshot", - name="value", - field=models.DecimalField( - decimal_places=2, default=0, max_digits=12, verbose_name="End value" - ), - ), - migrations.AlterField( - model_name="transaction", - name="account", - field=models.ForeignKey( - editable=False, - on_delete=django.db.models.deletion.CASCADE, - to="main.account", - verbose_name="Account", - ), - ), - migrations.AlterField( - model_name="transaction", - name="category", - field=models.ForeignKey( - blank=True, - null=True, - on_delete=django.db.models.deletion.SET_NULL, - to="main.category", - verbose_name="Category", - ), - ), - migrations.AlterField( - model_name="transaction", - name="name", - field=models.CharField( - default="Transaction", max_length=256, verbose_name="Name" - ), - ), - migrations.AlterField( - model_name="transaction", - name="payment", - field=models.CharField( - blank=True, max_length=128, null=True, verbose_name="Payment" - ), - ), - migrations.AlterField( - model_name="transaction", - name="real_date", - field=models.DateField(blank=True, null=True, verbose_name="Real date"), - ), - migrations.AlterField( - model_name="transaction", - name="snapshot", - field=models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, - to="main.snapshot", - verbose_name="Statement", - ), - ), - migrations.AlterField( - model_name="transaction", - name="trader", - field=models.CharField( - blank=True, max_length=128, null=True, verbose_name="Trader" - ), - ), - migrations.AlterField( - model_name="transaction", - name="user", - field=models.ForeignKey( - editable=False, - on_delete=django.db.models.deletion.CASCADE, - to=settings.AUTH_USER_MODEL, - verbose_name="User", - ), - ), - migrations.AlterField( - model_name="transaction", - name="value", - field=models.DecimalField( - decimal_places=2, default=0, max_digits=12, verbose_name="Value" - ), - ), - ] diff --git a/nummi/main/migrations/0022_alter_account_icon_alter_category_icon.py b/nummi/main/migrations/0022_alter_account_icon_alter_category_icon.py deleted file mode 100644 index 0823f19..0000000 --- a/nummi/main/migrations/0022_alter_account_icon_alter_category_icon.py +++ /dev/null @@ -1,26 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-31 08:53 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0021_alter_account_options_alter_category_options_and_more"), - ] - - operations = [ - migrations.AlterField( - model_name="account", - name="icon", - field=models.SlugField( - default="building-columns", max_length=64, verbose_name="Icon" - ), - ), - migrations.AlterField( - model_name="category", - name="icon", - field=models.SlugField( - default="folder", max_length=64, verbose_name="Icon" - ), - ), - ] diff --git a/nummi/main/migrations/0023_auto_20221231_1741.py b/nummi/main/migrations/0023_auto_20221231_1741.py deleted file mode 100644 index a8a2aaf..0000000 --- a/nummi/main/migrations/0023_auto_20221231_1741.py +++ /dev/null @@ -1,55 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-31 16:41 - -import pathlib - -import main.models -from django.conf import settings -from django.db import migrations - - -def move_files(apps, schema_editor): - Invoice = apps.get_model("main", "Invoice") - Snapshot = apps.get_model("main", "Snapshot") - - for invoice in Invoice.objects.all(): - print(f"Invoice {invoice.pk}") - if invoice.file is None: - invoice.delete() - continue - try: - initial_path = pathlib.Path(invoice.file.path) - except ValueError: - invoice.delete() - continue - if invoice.file is None or not initial_path.exists(): - print(f"!!! Path {initial_path} does not exist") - invoice.delete() - continue - prev_file = invoice.file.path - invoice.file.save(main.models.get_path(invoice, None), invoice.file) - pathlib.Path(prev_file).unlink() - - for snapshot in Snapshot.objects.filter(file__isnull=False): - print(f"Snapshot {snapshot.pk}") - try: - initial_path = pathlib.Path(snapshot.file.path) - except ValueError: - snapshot.file = None - snapshot.save() - continue - if not initial_path.exists(): - print(f"!!! Path {initial_path} does not exist") - snapshot.file = None - snapshot.save() - continue - prev_file = snapshot.file.path - snapshot.file.save(main.models.get_path(snapshot, None), snapshot.file) - pathlib.Path(prev_file).unlink() - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0022_alter_account_icon_alter_category_icon"), - ] - - operations = [migrations.RunPython(move_files)] diff --git a/nummi/main/migrations/0024_account_default.py b/nummi/main/migrations/0024_account_default.py deleted file mode 100644 index 61a62c2..0000000 --- a/nummi/main/migrations/0024_account_default.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 4.1.4 on 2022-12-31 18:04 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0023_auto_20221231_1741"), - ] - - operations = [ - migrations.AddField( - model_name="account", - name="default", - field=models.BooleanField(default=False, verbose_name="Default"), - ), - ] diff --git a/nummi/main/migrations/0025_alter_account_options_alter_invoice_options_and_more.py b/nummi/main/migrations/0025_alter_account_options_alter_invoice_options_and_more.py deleted file mode 100644 index 8156b92..0000000 --- a/nummi/main/migrations/0025_alter_account_options_alter_invoice_options_and_more.py +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by Django 4.1.4 on 2023-04-19 08:00 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0024_account_default"), - ] - - operations = [ - migrations.AlterModelOptions( - name="account", - options={ - "ordering": ["-default", "name"], - "verbose_name": "Account", - "verbose_name_plural": "Accounts", - }, - ), - migrations.AlterModelOptions( - name="invoice", - options={ - "ordering": ["transaction", "name"], - "verbose_name": "Invoice", - "verbose_name_plural": "Invoices", - }, - ), - migrations.AlterModelOptions( - name="snapshot", - options={ - "ordering": ["-date", "account"], - "verbose_name": "Statement", - "verbose_name_plural": "Statements", - }, - ), - migrations.AlterModelOptions( - name="transaction", - options={ - "ordering": ["-date", "snapshot"], - "verbose_name": "Transaction", - "verbose_name_plural": "Transactions", - }, - ), - migrations.RemoveField( - model_name="account", - name="icon", - ), - migrations.RemoveField( - model_name="category", - name="icon", - ), - migrations.AddField( - model_name="account", - name="uicon", - field=models.SlugField( - allow_unicode=True, default="🏦", max_length=1, verbose_name="Icon" - ), - ), - migrations.AddField( - model_name="category", - name="uicon", - field=models.SlugField( - allow_unicode=True, default="📂", max_length=1, verbose_name="Icon" - ), - ), - ] diff --git a/nummi/main/migrations/0026_alter_account_uicon_alter_category_uicon.py b/nummi/main/migrations/0026_alter_account_uicon_alter_category_uicon.py deleted file mode 100644 index 917a27f..0000000 --- a/nummi/main/migrations/0026_alter_account_uicon_alter_category_uicon.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 4.1.4 on 2023-04-19 08:06 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0025_alter_account_options_alter_invoice_options_and_more"), - ] - - operations = [ - migrations.AlterField( - model_name="account", - name="uicon", - field=models.CharField(default="🏦", max_length=1, verbose_name="Icon"), - ), - migrations.AlterField( - model_name="category", - name="uicon", - field=models.CharField(default="📂", max_length=1, verbose_name="Icon"), - ), - ] diff --git a/nummi/main/migrations/0027_remove_account_uicon_remove_category_uicon_and_more.py b/nummi/main/migrations/0027_remove_account_uicon_remove_category_uicon_and_more.py deleted file mode 100644 index d0f386f..0000000 --- a/nummi/main/migrations/0027_remove_account_uicon_remove_category_uicon_and_more.py +++ /dev/null @@ -1,32 +0,0 @@ -# Generated by Django 4.1.4 on 2023-04-19 13:10 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0026_alter_account_uicon_alter_category_uicon"), - ] - - operations = [ - migrations.RemoveField( - model_name="account", - name="uicon", - ), - migrations.RemoveField( - model_name="category", - name="uicon", - ), - migrations.AddField( - model_name="account", - name="icon", - field=models.SlugField(default="bank", max_length=16, verbose_name="Icon"), - ), - migrations.AddField( - model_name="category", - name="icon", - field=models.SlugField( - default="folder", max_length=16, verbose_name="Icon" - ), - ), - ] diff --git a/nummi/main/migrations/0028_alter_account_icon_alter_category_icon.py b/nummi/main/migrations/0028_alter_account_icon_alter_category_icon.py deleted file mode 100644 index 7e5d4a3..0000000 --- a/nummi/main/migrations/0028_alter_account_icon_alter_category_icon.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 4.1.4 on 2023-04-19 13:43 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("main", "0027_remove_account_uicon_remove_category_uicon_and_more"), - ] - - operations = [ - migrations.AlterField( - model_name="account", - name="icon", - field=models.SlugField(default="bank", max_length=24, verbose_name="Icon"), - ), - migrations.AlterField( - model_name="category", - name="icon", - field=models.SlugField( - default="folder", max_length=24, verbose_name="Icon" - ), - ), - ]