fix: fix migration
This commit is contained in:
parent
cf43f13a28
commit
99b5982f1c
|
@ -160,7 +160,7 @@ describe('Lens migrations', () => {
|
|||
});
|
||||
|
||||
describe('7.8.0 auto timestamp', () => {
|
||||
const context = {} as SavedObjectMigrationContext;
|
||||
const context = ({ log: { warning: () => {} } } as unknown) as SavedObjectMigrationContext;
|
||||
|
||||
const example = {
|
||||
type: 'lens',
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { cloneDeep, flow } from 'lodash';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { fromExpression, toExpression, Ast, ExpressionFunctionAST } from '@kbn/interpreter/common';
|
||||
import { SavedObjectMigrationFn } from 'src/core/server';
|
||||
|
||||
|
@ -153,5 +153,5 @@ export const migrations: Record<string, SavedObjectMigrationFn> = {
|
|||
},
|
||||
// The order of these migrations matter, since the timefield migration relies on the aggConfigs
|
||||
// sitting directly on the esaggs as an argument and not a nested function (which lens_auto_date was).
|
||||
'7.8.0': flow(removeLensAutoDate, addTimeFieldToEsaggs),
|
||||
'7.8.0': (doc, context) => addTimeFieldToEsaggs(removeLensAutoDate(doc, context), context),
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue