Open
Conversation
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.
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_defaultas this supplies a string but to usedefault=False. I could have also updated it to useserver_default='0'however this approach looks cleaner. Have also removed thenullable=truethis 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