summaryrefslogtreecommitdiffstats
path: root/activities/migrations
diff options
context:
space:
mode:
authorAndrew Godwin2022-12-01 18:46:49 -0700
committerAndrew Godwin2022-12-01 18:47:04 -0700
commit6f2f28a3a752cc47d9dc96bda862ed67cd75c9af (patch)
tree1165843b5c207d9e50028bf48db399df20cf7552 /activities/migrations
parenta826ae18ea41e44614ce20d5caad9425d76aa60d (diff)
downloadtakahe-6f2f28a3a752cc47d9dc96bda862ed67cd75c9af.tar.gz
takahe-6f2f28a3a752cc47d9dc96bda862ed67cd75c9af.tar.bz2
takahe-6f2f28a3a752cc47d9dc96bda862ed67cd75c9af.zip
Image attachment uploads
Diffstat (limited to 'activities/migrations')
-rw-r--r--activities/migrations/0003_postattachment_null_thumb.py54
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",
+ ),
+ ),
+ ]