[FEAT] Update database migrations to be more generic and applicable

This commit is contained in:
2023-03-12 15:37:20 +00:00
parent 0a3c85bb42
commit 858933c6bb
4 changed files with 4 additions and 3 deletions

View File

@@ -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':

View File

@@ -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),
),
]

View File

@@ -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'

View File

@@ -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')