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' } } + ) + } } ]) },