Feature/prepaire postgres - #2082
Open
Stephan-Kok wants to merge 4 commits into
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.
PostgreSQL preparation
This PR prepares EngineBlock (EB) for PostgreSQL support, as the previous PR is no longer valid.
Currently, there is only one real blocker for PostgreSQL support: the
certificatescolumn insso_provider_roles_eb5. There are also some hardcoded SQL statements that need to be addressed, as well as an issue with Consents and dates.As part of this PR, I have removed all serialized types from the database and changed the relevant columns that store JSON values to use the JSON type.
Backwards compatibility
As agreed, EB must remain backwards compatible, meaning that EB version X and EB version X+1 must both be able to work with the same database.
To maintain this requirement, I have introduced a new table:
sso_provider_roles_eb6.During the transition, the current EB version will write to both tables. The new version will use the new table as its source of truth.
PostgreSQL support will be added in the following release, as this requires
sso_provider_roles_eb5to be phased out.Testing
I have tested the changes locally using OpenConext-devconf:
devenvironment:cienvironment:All unit tests
PostgreSQL PR
Before committing/releasing this PR, please also review my follow-up PR that introduces PostgreSQL support. It would be preferable to have that PR tested before this one is released, so that any required changes can still be made.
I will add the PostgreSQL PR as a comment once it has been created.
Cleanup
Once this PR has been merged and the old PRs are no longer needed, they can be closed/removed: