summaryrefslogtreecommitdiffstats
path: root/activities/migrations/0003_postattachment_null_thumb.py
blob: f99915010c9539881245e1502d863b34eaacfd28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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",
            ),
        ),
    ]