diff options
Diffstat (limited to 'activities/migrations')
-rw-r--r-- | activities/migrations/0003_postattachment_null_thumb.py | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/activities/migrations/0003_postattachment_null_thumb.py b/activities/migrations/0003_postattachment_null_thumb.py new file mode 100644 index 0000000..f999150 --- /dev/null +++ b/activities/migrations/0003_postattachment_null_thumb.py @@ -0,0 +1,54 @@ +# Generated by Django 4.1.3 on 2022-12-01 23:42 + +import functools + +import django.db.models.deletion +import django.utils.timezone +from django.db import migrations, models + +import core.uploads + + +class Migration(migrations.Migration): + + dependencies = [ + ("activities", "0002_hashtag"), + ] + + operations = [ + migrations.AddField( + model_name="postattachment", + name="created", + field=models.DateTimeField( + auto_now_add=True, default=django.utils.timezone.now + ), + preserve_default=False, + ), + migrations.AddField( + model_name="postattachment", + name="thumbnail", + field=models.ImageField( + blank=True, + null=True, + upload_to=functools.partial( + core.uploads.upload_namer, *("attachment_thumbnails",), **{} + ), + ), + ), + migrations.AddField( + model_name="postattachment", + name="updated", + field=models.DateTimeField(auto_now=True), + ), + migrations.AlterField( + model_name="postattachment", + name="post", + field=models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.CASCADE, + related_name="attachments", + to="activities.post", + ), + ), + ] |