Create upgrade_schema() - #363
Merged
Merged
Conversation
sannegovaert
requested review from
peterdesmet
and
a lite review from Copilot
and removed request for
Copilot
August 26, 2026 14:27
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v2 #363 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 26 27 +1
Lines 757 792 +35
=========================================
+ Hits 757 792 +35 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- Does not create list from scratch and keeps custom properties! - Fewer if statements - Makes use of helper function - No need to check for NULL (handles and returns NULL)
peterdesmet
approved these changes
Aug 28, 2026
peterdesmet
left a comment
Member
There was a problem hiding this comment.
Nice! I've changed to foreignKeys approach to make use of purrr::modify_if(), which doesn't remove custom properties (those are used by DwC-DP I believe) and made the tests stricter.
I've also used the modify_if() approach for contributors in upgrade_descriptor()
peterdesmet
reviewed
Aug 28, 2026
peterdesmet
left a comment
Member
There was a problem hiding this comment.
Oh, and I added a helper function character_to_list() to convert string values to arrays, since we have to do that in 4 places.
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.
upgrade_schema()helper function #339foreignKeys.reference[x].resourceis removed when equal to the resource name. I first tried to add it only when it is not equal to resource name, but then the order of the list was changed. Therefore this solution