Skip to content

Commit b295c78

Browse files
committed
Add ignoreLifecycle property to Identities schema and update migration script
1 parent 6a9e112 commit b295c78

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/management/identities/_schemas/identities.schema.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ export class Identities extends AbstractSchema {
2828
@Prop({ type: Boolean, default: false })
2929
public deletedFlag: boolean;
3030

31+
@Prop({ type: Boolean, default: false })
32+
public ignoreLifecycle: boolean;
33+
3134
@Prop({ type: inetOrgPersonSchema, required: true })
3235
public inetOrgPerson: inetOrgPerson;
3336

src/migrations/jobs/1752765731-lifecycle.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ export default class LifeCycle1752765731 {
5353
this.mongo.collection('identities').updateOne(
5454
{ _id: identity._id },
5555
{
56-
$set: { 'inetOrgPerson.lifecycle': identity.lifecycle }
56+
$set: {
57+
'inetOrgPerson.lifecycle': identity.lifecycle,
58+
ignoreLifecycle: false,
59+
}
5760
},
5861
);
5962
}

0 commit comments

Comments
 (0)