Skip to content

Commit

Permalink
add verification status (#135917)
Browse files Browse the repository at this point in the history
  • Loading branch information
hop-dev authored Jul 7, 2022
1 parent 6cc8b4d commit 840ce5b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions x-pack/plugins/fleet/server/saved_objects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import { migrateInstallationToV7160, migratePackagePolicyToV7160 } from './migra
import { migrateInstallationToV800, migrateOutputToV800 } from './migrations/to_v8_0_0';
import { migratePackagePolicyToV820 } from './migrations/to_v8_2_0';
import { migrateInstallationToV830, migratePackagePolicyToV830 } from './migrations/to_v8_3_0';
import { migrateInstallationToV840 } from './migrations/to_v8_4_0';

/*
* Saved object types and mappings
Expand Down Expand Up @@ -268,6 +269,7 @@ const getSavedObjectTypes = (
'7.16.0': migrateInstallationToV7160,
'8.0.0': migrateInstallationToV800,
'8.3.0': migrateInstallationToV830,
'8.4.0': migrateInstallationToV840,
},
},
[ASSETS_SAVED_OBJECT_TYPE]: {
Expand Down
18 changes: 18 additions & 0 deletions x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_4_0.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import type { SavedObjectMigrationFn } from '@kbn/core/server';

import type { Installation } from '../../../common';

export const migrateInstallationToV840: SavedObjectMigrationFn<Installation, Installation> = (
installationDoc
) => {
installationDoc.attributes.verification_status = 'unknown';

return installationDoc;
};

0 comments on commit 840ce5b

Please sign in to comment.