Update backfill migration to also set label in dataReceived column #1048
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.
Closes getodk/central#540
I debated between adding a new migration that would fill in this data, or changing the old migration file. I decided to change the old migration file, the one that added
baseVersion
and that introduced the columndataReceived
, to also populate the label field indataReceived
.I was nervous about getting that change right so I wrote a test, but I've committed the code with the test skipped.
What has been done to verify that this works as intended?
A test.
Why is this the best possible solution? Were any other approaches considered?
I think this is tidier. The change is simple, it'll mean fewer migrations have to run on upgrade. The only downside is some of our test data may not have the label populated.
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
no
Does this change require updates to the API documentation? If so, please update docs/api.md as part of this PR.
no
Before submitting this PR, please make sure you have:
make test-full
and confirmed all checks still pass OR confirm CircleCI build passes