takahe/activities/migrations/0003_postattachment_null_thumb.py
2022-12-01 18:47:04 -07:00

54 lines
1.4 KiB
Python

# 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",
),
),
]