From a18318bae17f2eb8c8c7bef69a6da92d4ea6fd69 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Mon, 21 Nov 2022 18:23:23 +0100 Subject: [PATCH] Thumbnails: Store creation date --- .../migrations/0003_thumbnail_created.py | 18 ++++++++++++++++++ src/pretix/helpers/models.py | 1 + 2 files changed, 19 insertions(+) create mode 100644 src/pretix/helpers/migrations/0003_thumbnail_created.py diff --git a/src/pretix/helpers/migrations/0003_thumbnail_created.py b/src/pretix/helpers/migrations/0003_thumbnail_created.py new file mode 100644 index 0000000000..f7f81b21d7 --- /dev/null +++ b/src/pretix/helpers/migrations/0003_thumbnail_created.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.16 on 2022-11-21 17:22 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('pretixhelpers', '0002_auto_20180320_1219'), + ] + + operations = [ + migrations.AddField( + model_name='thumbnail', + name='created', + field=models.DateTimeField(auto_now_add=True, null=True), + ), + ] diff --git a/src/pretix/helpers/models.py b/src/pretix/helpers/models.py index 8bec3c8b72..7d7449193c 100644 --- a/src/pretix/helpers/models.py +++ b/src/pretix/helpers/models.py @@ -29,6 +29,7 @@ class Thumbnail(models.Model): source = models.CharField(max_length=255) size = models.CharField(max_length=255) thumb = models.FileField(upload_to='pub/thumbs/', max_length=255) + created = models.DateTimeField(auto_now_add=True, null=True) class Meta: unique_together = (('source', 'size'),)