mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-14 12:25:17 +00:00
Migrate employee spaces (#6270)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
949f33380c
commit
1f1b8f51d6
@ -25,6 +25,7 @@ import {
|
||||
tryMigrate
|
||||
} from '@hcengineering/model'
|
||||
import { htmlToMarkup } from '@hcengineering/text'
|
||||
import contact from '@hcengineering/contact'
|
||||
|
||||
import activity from './plugin'
|
||||
import { activityId, DOMAIN_ACTIVITY } from './index'
|
||||
@ -197,6 +198,16 @@ export const activityOperation: MigrateOperation = {
|
||||
({ attachedToClass }) => attachedToClass
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
state: 'migrate-employee-space-v1',
|
||||
func: async () => {
|
||||
await client.update<ActivityMessage>(
|
||||
DOMAIN_ACTIVITY,
|
||||
{ space: 'contact:space:Employee' as Ref<Space> },
|
||||
{ space: contact.space.Contacts }
|
||||
)
|
||||
}
|
||||
}
|
||||
])
|
||||
},
|
||||
|
@ -312,6 +312,16 @@ export const notificationOperation: MigrateOperation = {
|
||||
{
|
||||
state: 'migrate-notifications-space-v1',
|
||||
func: migrateNotificationsSpace
|
||||
},
|
||||
{
|
||||
state: 'migrate-employee-space-v1',
|
||||
func: async () => {
|
||||
await client.update<DocNotifyContext>(
|
||||
DOMAIN_DOC_NOTIFY,
|
||||
{ _class: notification.class.DocNotifyContext, objectSpace: 'contact:space:Employee' as Ref<Space> },
|
||||
{ objectSpace: contact.space.Contacts }
|
||||
)
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user