Skip to content

Commit

Permalink
[modelVersions] add new migration change types (#161147)
Browse files Browse the repository at this point in the history
## Summary

Related to #150296

- Add the following SO model version change types:
  - `data_removal`
  - `unsafe_transform`
- Change the existing `data_backfill` type to something less permissive
- Update the tsdoc and documentation accordingly

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
pgayvallet and kibanamachine authored Jul 7, 2023
1 parent 74a7860 commit 52eb488
Show file tree
Hide file tree
Showing 21 changed files with 824 additions and 255 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ describe('aggregateMappingAdditions', () => {
const changes: SavedObjectsModelChange[] = [
{ type: 'mappings_addition', addedMappings: { foo: { type: 'text' } } },
{ type: 'mappings_deprecation', deprecatedMappings: [] },
{ type: 'data_backfill', transform: jest.fn() },
{ type: 'data_backfill', backfillFn: jest.fn() },
{ type: 'unsafe_transform', transformFn: jest.fn() },
{ type: 'data_removal', removedAttributePaths: [] },
];
const output = aggregateMappingAdditions(changes);
expect(output).toEqual({
Expand Down
Loading

0 comments on commit 52eb488

Please sign in to comment.