apply-for-teacher-training icon indicating copy to clipboard operation
apply-for-teacher-training copied to clipboard

Migration to correct previously used nationalities

Open elceebee opened this issue 4 months ago • 2 comments

Context

We have replaced the old, somewhat outdated 'nationalities' list to refer to the DfeReference data. In addition, we have updated the carry over script so that if the reference data is updated, we won't carry over any outdated nationality data into the new cycles.

But we need to address a few instances where the old data exists in the 2026 application forms. There are just over 100 application forms that need to be updated.

Changes proposed in this pull request

Nationality can be stored in 1 of 5 columns, but I have ran various blazer queries and concluded that the bad data is only in first_nationality and second_nationality (third, fourth and fifth), do not be considered.

These are the nationalities and the number of application that will change in this migration.

Nationality (new) Number of applications
Bermudan 2
Cayman Islander, Caymanian 3
Congolese (Republic of the Congo) 1
Hongkonger or Cantonese 67
Citizen of Lesotho 1
Citizen of Madagascar 1
Citizen of Myanmar 8
Pitcairn Islander or Pitcairner 0
San Marinese 0
St Helenian or Tristanian as appropriate. Ascension has no indigenous population 0
Citizen of St Christopher (St Kitts) and Nevis 0
Trinidad and Tobago citizen 10
Turk, Turkish 76
Citizen of the United Arab Emirates 0

Guidance to review

I know this is not a super efficient update, but given the small numbers, I'm not overly worried about it. If you have concerns though, I'm open to suggestions.

Things to check

  • [ ] If the code removes any existing feature flags, a data migration has also been added to delete the entry from the database
  • [ ] API release notes have been updated if necessary
  • [ ] If it adds a significant user-facing change, is it documented in the CHANGELOG?
  • [x] Attach the PR to the Trello card
  • [ ] This code adds a column or table to the database
    • [ ] This code does not rely on migrations in the same Pull Request
    • [ ] decide whether it needs to be in analytics yml file or analytics blocklist
    • [ ] data insights team has been informed of the change and have updated the pipeline
    • [ ] the sanitise.sql script and 0025-protecting-personal-data-in-production-dump.md ADR have been updated
    • [ ] does the code safely backfill existing records for consistency

elceebee avatar Dec 22 '25 16:12 elceebee

Review App Deployed

Environment URL
review-11525 https://apply-review-11525.test.teacherservices.cloud

The review app has been successfully deployed and is ready for testing.

github-actions[bot] avatar Dec 22 '25 17:12 github-actions[bot]