Skip to content

Ensure agreement_type is specified for MouSignatures added using rake tasks#2634

Merged
stephencdaly merged 2 commits intomainfrom
add-agreement-type-to-mou-signature-rake-task
Mar 16, 2026
Merged

Ensure agreement_type is specified for MouSignatures added using rake tasks#2634
stephencdaly merged 2 commits intomainfrom
add-agreement-type-to-mou-signature-rake-task

Conversation

@stephencdaly
Copy link
Contributor

What problem does this pull request solve?

I'm not sure if this rake task is still needed, but now the MouSignatures have an agreement_type it should always be explicitly specified.

Add a migration to remove the default value for agreement_type to ensure we never mistakenly leave it as the default when we don't intend to.

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

We set a default value for the agreement_type when we added the column
so we pre-populated existing records with that value. Remove the
default value to make sure we're always deliberately setting the
correct agreement_type for new records.
MouSignatures now have an agreement_type of "crown" or "non_crown".
Update the rake task to require specifying the agreement_type.
@stephencdaly stephencdaly force-pushed the add-agreement-type-to-mou-signature-rake-task branch from 66abf70 to aa886b7 Compare March 16, 2026 15:15
@sonarqubecloud
Copy link

@github-actions
Copy link

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2634.admin.review.forms.service.gov.uk/

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

@stephencdaly stephencdaly added this pull request to the merge queue Mar 16, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 16, 2026
@stephencdaly stephencdaly added this pull request to the merge queue Mar 16, 2026
Merged via the queue into main with commit 037d9bc Mar 16, 2026
6 checks passed
@stephencdaly stephencdaly deleted the add-agreement-type-to-mou-signature-rake-task branch March 16, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants