From 651d46d63560625694749cd81b4c947d81124816 Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Fri, 31 May 2024 09:48:21 +0500 Subject: [PATCH] Fix avatar kind (#5705) Signed-off-by: Denis Bykhov --- models/contact/src/migration.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/models/contact/src/migration.ts b/models/contact/src/migration.ts index 98b81dfcb1..00f7ea08df 100644 --- a/models/contact/src/migration.ts +++ b/models/contact/src/migration.ts @@ -241,6 +241,16 @@ export const contactOperation: MigrateOperation = { func: async (client) => { await migrateAvatars(client) } + }, + { + state: 'avatarsKind', + func: async (client) => { + await client.update( + DOMAIN_CONTACT, + { avatarKind: { $exists: true } }, + { $rename: { avatarKind: 'avatarType' } } + ) + } } ]) },