Fix avatar kind (#5705)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2024-05-31 09:48:21 +05:00 committed by GitHub
parent 42d8c4582c
commit 651d46d635
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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