Change field length.
authorRadek Czajka <rczajka@rczajka.pl>
Mon, 21 Oct 2024 11:32:14 +0000 (13:32 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Mon, 21 Oct 2024 11:32:14 +0000 (13:32 +0200)
src/cover/migrations/0007_alter_image_file.py [new file with mode: 0644]
src/cover/models.py

diff --git a/src/cover/migrations/0007_alter_image_file.py b/src/cover/migrations/0007_alter_image_file.py
new file mode 100644 (file)
index 0000000..812b938
--- /dev/null
@@ -0,0 +1,24 @@
+# Generated by Django 4.1.9 on 2024-10-21 13:31
+
+import cover.models
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ("cover", "0006_image_example"),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name="image",
+            name="file",
+            field=models.ImageField(
+                max_length=1024,
+                storage=cover.models.OverwriteStorage(),
+                upload_to="cover/image",
+                verbose_name="file",
+            ),
+        ),
+    ]
index d766222..2c452a2 100644 (file)
@@ -33,6 +33,7 @@ class Image(models.Model):
     download_url = models.URLField(max_length=4096, unique=True, verbose_name=_('image download URL'), null=True, blank=True)
     file = models.ImageField(
         upload_to='cover/image',
     download_url = models.URLField(max_length=4096, unique=True, verbose_name=_('image download URL'), null=True, blank=True)
     file = models.ImageField(
         upload_to='cover/image',
+        max_length=1024,
         storage=OverwriteStorage(),
         verbose_name=_('file')
     )
         storage=OverwriteStorage(),
         verbose_name=_('file')
     )