Skip to content

set default not server_default#459

Open
matthew-robinson-ons wants to merge 2 commits intomainfrom
fix-mark-for-deletion
Open

set default not server_default#459
matthew-robinson-ons wants to merge 2 commits intomainfrom
fix-mark-for-deletion

Conversation

@matthew-robinson-ons
Copy link
Copy Markdown
Contributor

@matthew-robinson-ons matthew-robinson-ons commented Feb 18, 2026

What and why?

Secure message app was failing due to the definition of the mark_for_deletion default.
Due to the column being a boolean, I have updated the default to not use server_default as this supplies a string but to use default=False. I could have also updated it to use server_default='0' however this approach looks cleaner. Have also removed the nullable=true this is the default anyway so isn't needed and reduces the code changes.

How to test?

This was a bit fiddly to test due to the database initialisation.
Run the acceptance tests on main, they should currently be failing.
Redeploy your env with this PR ensuring that the secure message database is created with the model from this PR. I ended up recreating my entire env and deploying this PR instead of latest to ensure the db changes took effect.
Run the acceptance tests and check the functionality.
When testing I couldn't get the error to appear through the UI due to how the database gets initialised, i also couldn't get any errors deploying the app locally.

This needs testing against a new env, and an existing env with and without pre-existing secure message data.

The delta 007 needs to be ran against your env with this pr deployed, with existing secure message data as well for the different database setups we have across dev, performance, preprod and prod.

Jira

https://officefornationalstatistics.atlassian.net/browse/RAS-1832

@matthew-robinson-ons matthew-robinson-ons requested a review from a team as a code owner February 18, 2026 10:45
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