Add script to fix which schools are attributed to BLMK and N&W#5157
Merged
MartinVanIJcken merged 2 commits intonextfrom Nov 24, 2025
Merged
Add script to fix which schools are attributed to BLMK and N&W#5157MartinVanIJcken merged 2 commits intonextfrom
MartinVanIJcken merged 2 commits intonextfrom
Conversation
431b6e4 to
928ba23
Compare
283f03a to
898a9ce
Compare
thomasleese
approved these changes
Nov 18, 2025
Contributor
thomasleese
left a comment
There was a problem hiding this comment.
For data migrations we would normally set these up as Rake tasks (https://github.com/nhsuk/manage-vaccinations-in-schools/blob/main/lib/tasks/data_migrations.rake) to make them easier to run (without needing a Rails console).
I've left a few comments, but still approved the change this is only temporary code which is only going to be run once and then deleted.
I think it might be worth adding some basic tests, but if we know it's working then that's okay.
898a9ce to
f682db9
Compare
f682db9 to
f25feed
Compare
thomasleese
approved these changes
Nov 21, 2025
These SAIS teams are currently configured with all teams in their area wheareas they should be configured with only a limited selection of schools. This change amends them to have only and exactly the schools that they should have. Jira-Issue: MAV-2352 Jira-Issue: MAV-2353
The warnings for schools without sessions are purposfully excluded from, the validation inside the perform as a school ending up without sessions can happen if that school did not have sessions to begin with. Rather than resolving that in this script we will use the existing Mavis CLI tool to resolve such an issue if it occurs. Jira-Issue: MAV-2352 Jira-Issue: MAV-2353
f25feed to
67922d9
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Post deploy steps
Note, there is no need for these steps to be performed immediately after deployment. In fact, it may be best to let the Support team run these steps the day after.
Enter the rails console and run
SchoolRemovalForBlmkAndNw.perform.Then run
SchoolRemovalForBlmkAndNw.warn_about_incorrect_state, and if any warnings are raised, copy them onto the appropriate ticket MAV-2352, MAV-2353.Lastly, raise a PR to remove this script.
Comments
These SAIS teams are currently configured with all teams in their area whereas they should be configured with only a limited selection of schools. This change amends them to have only and exactly the schools that they should have.
Jira-Issue: MAV-2352
Jira-Issue: MAV-2353
Jira-Issue: MAV-2590