Skip to content

Commit

Permalink
Use schema version constant
Browse files Browse the repository at this point in the history
  • Loading branch information
miltonhultgren committed Jul 5, 2024
1 parent 929a6a9 commit 368007d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import { EntityDefinition } from '@kbn/entities-schema';
import { ENTITY_SCHEMA_VERSION_V1 } from '../../../../common/constants_entities';
import { generateHistoryIndexName } from '../helpers/generate_component_id';

function createIdTemplate(definition: EntityDefinition) {
Expand Down Expand Up @@ -72,7 +73,7 @@ export function generateHistoryProcessors(definition: EntityDefinition) {
{
set: {
field: 'entity.schemaVersion',
value: 'v1',
value: ENTITY_SCHEMA_VERSION_V1,
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import { EntityDefinition } from '@kbn/entities-schema';
import { ENTITY_SCHEMA_VERSION_V1 } from '../../../../common/constants_entities';
import { generateLatestIndexName } from '../helpers/generate_component_id';

function mapDestinationToPainless(destination: string, source: string) {
Expand Down Expand Up @@ -66,7 +67,7 @@ export function generateLatestProcessors(definition: EntityDefinition) {
{
set: {
field: 'entity.schemaVersion',
value: 'v1',
value: ENTITY_SCHEMA_VERSION_V1,
},
},
...(definition.staticFields != null
Expand Down

0 comments on commit 368007d

Please sign in to comment.