From 07dcacb668c83a3dd85e60457dc045d5edcac867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Riku=20Kestila=CC=88?= Date: Fri, 13 Oct 2023 11:49:01 +0300 Subject: [PATCH] fix: conflicting migrations, add timestamps --- .../{0041_ahjosetting.py => 0042_ahjosetting.py} | 9 +++++++-- backend/benefit/applications/models.py | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) rename backend/benefit/applications/migrations/{0041_ahjosetting.py => 0042_ahjosetting.py} (55%) diff --git a/backend/benefit/applications/migrations/0041_ahjosetting.py b/backend/benefit/applications/migrations/0042_ahjosetting.py similarity index 55% rename from backend/benefit/applications/migrations/0041_ahjosetting.py rename to backend/benefit/applications/migrations/0042_ahjosetting.py index 8c9fd70fe3..f708631520 100644 --- a/backend/benefit/applications/migrations/0041_ahjosetting.py +++ b/backend/benefit/applications/migrations/0042_ahjosetting.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.18 on 2023-09-29 09:16 +# Generated by Django 3.2.18 on 2023-10-13 12:38 from django.db import migrations, models @@ -6,7 +6,7 @@ class Migration(migrations.Migration): dependencies = [ - ('applications', '0040_pay_subsidy_types'), + ('applications', '0041_add_paper_application_date'), ] operations = [ @@ -14,8 +14,13 @@ class Migration(migrations.Migration): name='AhjoSetting', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='time created')), + ('modified_at', models.DateTimeField(auto_now=True, verbose_name='time modified')), ('name', models.CharField(max_length=255, unique=True)), ('data', models.JSONField()), ], + options={ + 'abstract': False, + }, ), ] diff --git a/backend/benefit/applications/models.py b/backend/benefit/applications/models.py index 8146ad9dfe..449b2561b9 100755 --- a/backend/benefit/applications/models.py +++ b/backend/benefit/applications/models.py @@ -877,6 +877,6 @@ class ReviewState(models.Model): approval = models.BooleanField(default=False, verbose_name=_("approval")) -class AhjoSetting(models.Model): +class AhjoSetting(TimeStampedModel): name = models.CharField(max_length=255, unique=True) data = JSONField()