Clarify no plans to remove legacy migrations at the moment (#201970)

## Summary

We've had some questions around legacy migrations that are flagged as
deprecated in the type. This updates the typescript doc comment to
hopefully clarify that.
This commit is contained in:
Rudolf Meijering 2024-11-29 11:11:03 +01:00 committed by GitHub
parent 0544f35355
commit 80e49111bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -75,8 +75,11 @@ export interface SavedObjectsType<Attributes = any> {
*/
mappings: SavedObjectsTypeMappingDefinition;
/**
* An optional map of {@link SavedObjectMigrationFn | migrations} or a function returning a map of {@link SavedObjectMigrationFn | migrations} to be used to migrate the type.
* @deprecated Use {@link SavedObjectsType.modelVersions | modelVersions} instead.
* An optional map of {@link SavedObjectMigrationFn | migrations} or a function returning a map of
* {@link SavedObjectMigrationFn | migrations} to be used to migrate the type.
*
* @deprecated Use {@link SavedObjectsType.modelVersions | modelVersions} for all future migrations instead. We have no plans
* to remove legacy migrations at this point, so there's no need to migrate existing migrations to model versions.
*/
migrations?: SavedObjectMigrationMap | (() => SavedObjectMigrationMap);
/**
@ -89,8 +92,8 @@ export interface SavedObjectsType<Attributes = any> {
*/
schemas?: SavedObjectsValidationMap | (() => SavedObjectsValidationMap);
/**
* If defined, objects of this type will be converted to a 'multiple' or 'multiple-isolated' namespace type when migrating to this
* version.
* If defined, objects of this type will be converted to a 'multiple' or 'multiple-isolated' namespace type when migrating to
* this version.
*
* Requirements:
*