diff --git a/smugfolioapi/migrations/0003_remove_images_file_name_remove_images_file_path.py b/smugfolioapi/migrations/0003_remove_images_file_name_remove_images_file_path.py new file mode 100644 index 0000000..470e1de --- /dev/null +++ b/smugfolioapi/migrations/0003_remove_images_file_name_remove_images_file_path.py @@ -0,0 +1,21 @@ +# Generated by Django 4.0.3 on 2022-03-18 15:30 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('smugfolioapi', '0002_rename_smug_user_id_images_smug_user_images_picture'), + ] + + operations = [ + migrations.RemoveField( + model_name='images', + name='file_name', + ), + migrations.RemoveField( + model_name='images', + name='file_path', + ), + ] diff --git a/smugfolioapi/models/images.py b/smugfolioapi/models/images.py index 1a5ff0f..64f5abd 100644 --- a/smugfolioapi/models/images.py +++ b/smugfolioapi/models/images.py @@ -9,6 +9,8 @@ class Images(models.Model): width_field=None, max_length=None, null=True ) + # picture key in the table is storing the file path, not the binary data, so I don't have worry about space constraints with the 100 character limit. + # @property # def imagecount(self): # return self.__imagecount diff --git a/smugfolioserver/db.sql b/smugfolioserver/db.sql index 6517769..44e25b1 100644 --- a/smugfolioserver/db.sql +++ b/smugfolioserver/db.sql @@ -2,4 +2,4 @@ DELETE FROM smugfolioapi_images WHERE id = 1; SELECT * -FROM smugfolioapi_images; \ No newline at end of file +FROM smugfolioapi_images;