Coverage for src/backend/InvenTree/common/migrations/0042_attachment_is_image_attachment_thumbnail.py: 100%
6 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 17:47 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 17:47 +0000
1# Generated by Django 5.2.14 on 2026-05-18 11:34
3from django.db import migrations, models
5import common.models
6import common.validators
9class Migration(migrations.Migration):
11 dependencies = [
12 ("common", "0041_auto_20251203_1244"),
13 ]
15 operations = [
16 migrations.AddField(
17 model_name="attachment",
18 name="thumbnail",
19 field=models.ImageField(
20 blank=True,
21 help_text="Thumbnail image for this attachment",
22 null=True,
23 upload_to="",
24 verbose_name="Thumbnail",
25 ),
26 ),
27 migrations.AddField(
28 model_name="attachment",
29 name="is_image",
30 field=models.BooleanField(
31 default=False,
32 help_text="True if this attachment is a valid image file",
33 verbose_name="Is image",
34 ),
35 ),
36 migrations.AlterField(
37 model_name="attachment",
38 name="attachment",
39 field=models.FileField(
40 blank=True,
41 help_text="Select file to attach",
42 null=True,
43 upload_to=common.models.rename_attachment,
44 validators=[common.validators.validate_attachment_file],
45 verbose_name="Attachment",
46 ),
47 ),
48 ]