-
Notifications
You must be signed in to change notification settings - Fork 0
BI-2109 - Create Sub-entity Dataset from UI #33
Conversation
UPDATE | ||
trial | ||
SET | ||
additional_info = additional_info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the new code was run prior to running this db migration for some reason, would the trial datasets array be overwritten with the old datasetId value? If so, do we need to do any check in the migration or just leave it up to process?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'll update the migration to be safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, 8e06edf.
I tested this change by creating an experiment with the old code, then checking out the bi-web and bi-api feature/BI-2109 branches, creating two experiments and a sub-entity dataset, then checking out the BrAPI-Java-TestServer feature/BI-2109 branch and running it to ensure the migration added the datasets
key for the "legacy" data and preserved the datasets
key for the "new" data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good
UPDATE | ||
trial | ||
SET | ||
additional_info = additional_info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
passed Developer testing
Description
Story: BI-2109
bi-web PR: Breeding-Insight/bi-web#382
bi-api PR: Breeding-Insight/bi-api#362
Added a migration to insert a
datasets
array into the additional_info of rows in the trial table,datasets
is an array of objects withid
,name
andlevel
fields.Important Note: the migration is named in such a way that BI (Breeding Insight) will be able to fit an arbitrary number of BI-specific migrations between the migrations that will actually be pushed upstream. This migration will not be pushed upstream, as it is a BI-specific data migration.
Testing
Create some "legacy" data to migrate.
develop
branch for bi-web, bi-api and brapi-Java-TestServer.datasets
array).Checkout feature branches and let the migration run on the "legacy" data.
feature/BI-2109
branches for bi-web, bi-api and brapi-Java-TestServer.Test new features.