Create a migration function for datasource to add migrationVersion field#6025
Conversation
a13d693 to
35eefe8
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6025 +/- ##
==========================================
- Coverage 67.13% 67.13% -0.01%
==========================================
Files 3317 3318 +1
Lines 64016 64021 +5
Branches 10256 10256
==========================================
+ Hits 42979 42981 +2
- Misses 18545 18548 +3
Partials 2492 2492
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Thanks @yibow98 should we remove dummy from title. it add migration method and set the default value to 2.4.0. not truly dummy |
Done |
seraphjiang
left a comment
There was a problem hiding this comment.
if we use '2.4.0', how could we differentiate the MDS data saved before 2.13.0 . Otherwise lgtm
The migrationVersion is the version that the saved object apply the latest migration. If there is not data schema change, then all datasource should have the migrationVersion of 2.4.0 until we have a new migration function. |
35eefe8 to
3779498
Compare
Signed-off-by: Yibo Wang <yibow@amazon.com>
3779498 to
548546b
Compare
|
Makes sense. Might need to fix at the root if you ever need to add multiple migrations. |
…eld (#6025) This PR is to add a migration function with version 2.4.0 for datasource to add a migrationVersion field. For more information, please refer to the RFC: #6022 Issues Resolved #6022 Signed-off-by: Yibo Wang <yibow@amazon.com> (cherry picked from commit 70adcc9) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
This PR is to add a migration function with version 2.4.0 for datasource to add a migrationVersion field.
For more information, please refer to the RFC: #6022
Issues Resolved
#6022
Testing the changes
For the testing, it is included in this RFC: #6022
Check List
yarn test:jestyarn test:jest_integration