From 8e3738fe310a8728054beac16dc8d09614b68195 Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Wed, 9 Aug 2023 11:20:00 +0700 Subject: [PATCH] Fix migrations (#3575) Signed-off-by: Andrey Sobolev --- models/contact/src/migration.ts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/models/contact/src/migration.ts b/models/contact/src/migration.ts index 942176122e..6c70844488 100644 --- a/models/contact/src/migration.ts +++ b/models/contact/src/migration.ts @@ -118,6 +118,37 @@ export const contactOperation: MigrateOperation = { } ) + await client.update( + DOMAIN_TX, + { + objectClass: core.class.Attribute, + 'attributes.type.to': 'contact:class:Employee' + }, + { + $set: { 'attributes.type.to': contact.mixin.Employee } + } + ) + await client.update( + DOMAIN_TX, + { + objectClass: core.class.Attribute, + 'operations.type.to': 'contact:class:Employee' + }, + { + $set: { 'operations.type.to': contact.mixin.Employee } + } + ) + + await client.update( + DOMAIN_TX, + { + 'attributes.extends': 'contact:class:Employee' + }, + { + $set: { 'attributes.extends': contact.mixin.Employee } + } + ) + for (const d of client.hierarchy.domains()) { await client.update( d,