From d50c0c7a4e26ffd4f97776ed6e3a6dd729fa6b94 Mon Sep 17 00:00:00 2001 From: Dominik George <dominik.george@teckids.org> Date: Mon, 16 Nov 2020 14:00:47 +0100 Subject: [PATCH] Cripple initial migration to not require stale dependency As the image cropping field will later be removed, it is ok to create a dummy in the initial migration. Installations that already migrated with the original image cropping field are untouched because they already have the migration applied; new installations migrating from scratch will get the dummy and later replace it. --- aleksis/core/migrations/0001_initial.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/aleksis/core/migrations/0001_initial.py b/aleksis/core/migrations/0001_initial.py index 4dd6486f4..9999e1a66 100644 --- a/aleksis/core/migrations/0001_initial.py +++ b/aleksis/core/migrations/0001_initial.py @@ -8,7 +8,6 @@ import django.contrib.postgres.fields.jsonb import django.contrib.sites.managers from django.db import migrations, models import django.db.models.deletion -import image_cropping.fields import phonenumber_field.modelfields @@ -125,8 +124,8 @@ class Migration(migrations.Migration): ('email', models.EmailField(blank=True, max_length=254, verbose_name='E-mail address')), ('date_of_birth', models.DateField(blank=True, null=True, verbose_name='Date of birth')), ('sex', models.CharField(blank=True, choices=[('f', 'female'), ('m', 'male')], max_length=1, verbose_name='Sex')), - ('photo', image_cropping.fields.ImageCropField(blank=True, null=True, upload_to='', verbose_name='Photo')), - ('photo_cropping', image_cropping.fields.ImageRatioField('photo', '600x800', adapt_rotation=False, allow_fullsize=False, free_crop=False, help_text=None, hide_image_field=False, size_warning=True, verbose_name='photo cropping')), + ('photo', models.CharField(blank=True, max_length=1)), + ('photo_cropping', models.CharField(blank=True, max_length=1)), ('description', models.TextField(blank=True, verbose_name='Description')), ('guardians', models.ManyToManyField(blank=True, related_name='children', to='core.Person', verbose_name='Guardians / Parents')), ('primary_group', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.Group', verbose_name='Primary group')), -- GitLab