Update Db2Adapter.createFhirSchemas to succeed when schemas exist#520
Merged
Update Db2Adapter.createFhirSchemas to succeed when schemas exist#520
Conversation
Its simply not used any more, so its silly to keep creating it. I also removed the `resourceName` concept from both the Audit Context object and also the FHIRConfiguration config props. In the future, I'd also like to remove the undocumented `fhirServer/audit/patientIdExtensionUrl` config property, but that one wasn't quite as clean to remove right now...we need to think through whether/how to include the data subject (e.g. Patient) identifier in the audit log in a more FHIR-native way. Finally, I included some unrelated minor updates to the `fhir-persistence-schema` README.md; now the examples all use the `default` tenant...this is the simplest option because otherwise everyone needs to understand our tenancy model just to get something working on Db2. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Without this, the step always fails if you've already created a schema on this db because FHIR_ADMIN already exists. Now it will succeed but print a WARNING to indicate it already existed. 1. introduced DuplicateNameException and a corresponding helper to identify when schema creation fails due to the schema already existing 2. renamed DuplicateValueException to UniquenessViolationException to avoid confusion with DuplicateNameException 3. updated Db2Adapter to catch the DuplicateNameException and WARN instead of failing Also added log statement at the end of tenant creation so that you don't need to scroll to the very top of the output to find the generated key Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
issue #518 - remove audit db from default config
Contributor
|
interesting, the fhir-audit changes are in the PR. |
prb112
reviewed
Dec 19, 2019
Member
Author
Sorry, that was just a bit lazy on my part. I created this PR first, then branched and did those changes on top of these. Then, instead of cherry-picking it to a new branch from master, I just opened that PR against this one. Just disregard those changes since you already reviewed them (and keep in mind they aren't in master until we merge this one). |
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
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.
Without this, the step always fails if you've already created a schema
on this db because FHIR_ADMIN already exists. Now it will succeed but
print a WARNING to indicate it already existed.
introduced DuplicateNameException and a corresponding helper to
identify when schema creation fails due to the schema already existing
renamed DuplicateValueException to UniquenessViolationException to
avoid confusion with DuplicateNameException
updated Db2Adapter to catch the DuplicateNameException and WARN
instead of failing
Also added log statement at the end of tenant creation so that you don't
need to scroll to the very top of the output to find the generated key
Signed-off-by: Lee Surprenant lmsurpre@us.ibm.com