From f61a8371f4f4bb86d7151de86fd455228e138544 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Sun, 22 Dec 2024 12:12:37 +0100 Subject: [PATCH] Revert "added user filkes to recipe and added is_image flag to user file" This reverts commit 0bcdf5e0a3342e103c1d7a31aa2a457c3bb170c2. --- cookbook/migrations/0220_recipe_images.py | 18 ------------------ cookbook/models.py | 2 -- 2 files changed, 20 deletions(-) delete mode 100644 cookbook/migrations/0220_recipe_images.py diff --git a/cookbook/migrations/0220_recipe_images.py b/cookbook/migrations/0220_recipe_images.py deleted file mode 100644 index 7e03a9763f..0000000000 --- a/cookbook/migrations/0220_recipe_images.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 4.2.17 on 2024-12-22 11:05 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('cookbook', '0219_connectorconfig_supports_description_field'), - ] - - operations = [ - migrations.AddField( - model_name='recipe', - name='images', - field=models.ManyToManyField(blank=True, to='cookbook.userfile'), - ), - ] diff --git a/cookbook/models.py b/cookbook/models.py index aa14fe941c..e415609924 100644 --- a/cookbook/models.py +++ b/cookbook/models.py @@ -1000,7 +1000,6 @@ class Recipe(ExportModelOperationsMixin('recipe'), models.Model, PermissionModel servings = models.IntegerField(default=1) servings_text = models.CharField(default='', blank=True, max_length=32) image = models.ImageField(upload_to='recipes/', blank=True, null=True) - images = models.ManyToManyField("UserFile", blank=True) storage = models.ForeignKey(Storage, on_delete=models.PROTECT, blank=True, null=True) file_uid = models.CharField(max_length=256, default="", blank=True) file_path = models.CharField(max_length=512, default="", blank=True) @@ -1429,7 +1428,6 @@ class UserFile(ExportModelOperationsMixin('user_files'), models.Model, Permissio name = models.CharField(max_length=128) file = models.FileField(upload_to='files/') file_size_kb = models.IntegerField(default=0, blank=True) - is_image = models.BooleanField(default=False) created_at = models.DateTimeField(auto_now_add=True) created_by = models.ForeignKey(User, on_delete=models.CASCADE)