From 8cb67ca00281177ab8d2fcd4ba1fba9bf311f736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Mon, 17 Mar 2025 08:36:41 +0100 Subject: [PATCH] Add updated_at to Game --- games/migrations/0007_game_updated_at.py | 18 ++++++++++++++++++ games/models.py | 1 + 2 files changed, 19 insertions(+) create mode 100644 games/migrations/0007_game_updated_at.py diff --git a/games/migrations/0007_game_updated_at.py b/games/migrations/0007_game_updated_at.py new file mode 100644 index 0000000..6fbce47 --- /dev/null +++ b/games/migrations/0007_game_updated_at.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1.5 on 2025-03-17 07:36 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('games', '0006_alter_game_sort_name_alter_game_wikidata_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='game', + name='updated_at', + field=models.DateTimeField(auto_now=True), + ), + ] diff --git a/games/models.py b/games/models.py index e01f754..792e8fb 100644 --- a/games/models.py +++ b/games/models.py @@ -22,6 +22,7 @@ class Game(models.Model): ) created_at = models.DateTimeField(auto_now_add=True) + updated_at = models.DateTimeField(auto_now=True) class Status(models.TextChoices): UNPLAYED = (