From 858933c6bb4027f82ca91472da30c276051a5877 Mon Sep 17 00:00:00 2001 From: Matthew Grove Date: Sun, 12 Mar 2023 15:37:20 +0000 Subject: [PATCH] [FEAT] Update database migrations to be more generic and applicable --- people/forms.py | 2 +- people/migrations/0009_add_first_person_fields.py | 2 +- people/migrations/0024_remove_age_gender.py | 1 + people/migrations/0048_disciplines_and_organisations.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/people/forms.py b/people/forms.py index 3c65243..6b19184 100755 --- a/people/forms.py +++ b/people/forms.py @@ -195,7 +195,7 @@ class PersonAnswerSetForm(forms.ModelForm, DynamicAnswerSetBase): 'project_started_date': f'Date started on the {config.PARENT_PROJECT_NAME} project', 'external_organisations': - 'Please list the main organisations external to BRECcIA work that you have been working with since 1st January 2019 that are involved in food/water security in African dryland regions' + 'Which external organisations do you work with that are involved in a related field/industry?' } help_texts = { 'organisation_started_date': diff --git a/people/migrations/0009_add_first_person_fields.py b/people/migrations/0009_add_first_person_fields.py index 2f9db55..0d22931 100644 --- a/people/migrations/0009_add_first_person_fields.py +++ b/people/migrations/0009_add_first_person_fields.py @@ -18,6 +18,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='person', name='gender', - field=models.CharField(blank=True, choices=[('M', 'Male'), ('F', 'Female'), ('O', 'Other'), ('N', 'Prefer not to say')], max_length=1), + field=models.CharField(blank=True, choices=[('M', 'Male'), ('F', 'Female'), ('B', 'Non-binary'), ('O', 'Other'), ('N', 'Prefer not to say')], max_length=1), ), ] diff --git a/people/migrations/0024_remove_age_gender.py b/people/migrations/0024_remove_age_gender.py index 4bbba8c..fbecbf9 100644 --- a/people/migrations/0024_remove_age_gender.py +++ b/people/migrations/0024_remove_age_gender.py @@ -10,6 +10,7 @@ from .utils.question_sets import port_question class GenderChoices(TextChoices): MALE = 'M', 'Male' FEMALE = 'F', 'Female' + NON_BINARY = 'B', 'Non-binary' OTHER = 'O', 'Other' PREFER_NOT_TO_SAY = 'N', 'Prefer not to say' diff --git a/people/migrations/0048_disciplines_and_organisations.py b/people/migrations/0048_disciplines_and_organisations.py index a904a9c..7ca4acc 100644 --- a/people/migrations/0048_disciplines_and_organisations.py +++ b/people/migrations/0048_disciplines_and_organisations.py @@ -29,7 +29,7 @@ def forward_organisations(apps, schema_editor): try: question = PersonQuestion.objects.filter( - text='Please list the main organisations external to BRECcIA work that you have been working with since 1st January 2019 that are involved in food/water security in African dryland regions' + text='Which external organisations do you work with that are involved in a related field/industry?' ).latest('version') PersonAnswerSet = apps.get_model('people', 'PersonAnswerSet')