[Saved Objects] Update the migrationVersion property to hold a plain string value (#150075)

* Update document migrator to rely on `typeMigrationVersion` instead of `migrationVersion`.
* Refactor document migrator to extract migration pipeline logic.
* Add `core` migration type.
This commit is contained in:
Michael Dokolin 2023-03-24 13:45:30 +01:00 committed by GitHub
parent 1a0cab832d
commit 17876df41a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
69 changed files with 1205 additions and 828 deletions

View file

@ -252,7 +252,7 @@ Having said that, if a document is encountered that is not in the expected shape
fail an upgrade than to silently ignore a corrupt document which can cause unexpected behaviour at some future point in time. When such a scenario is encountered,
the error should be verbose and informative so that the corrupt document can be corrected, if possible.
**WARNING:** Do not attempt to change the `migrationVersion`, `id`, or `type` fields within a migration function, this is not supported.
**WARNING:** Do not attempt to change the `typeMigrationVersion`, `id`, or `type` fields within a migration function, this is not supported.
### Testing Migrations