Fix email migration script (#7267)
This commit is contained in:
@ -93,6 +93,12 @@ export class MigrateEmailFieldsToEmailsCommand extends ActiveWorkspacesCommandRu
|
||||
}
|
||||
|
||||
try {
|
||||
await this.migratePersonEmailFieldToEmailsField(
|
||||
workspaceId,
|
||||
workspaceQueryRunner,
|
||||
dataSourceMetadata,
|
||||
);
|
||||
|
||||
const customFieldsWithEmailType =
|
||||
await this.fieldMetadataRepository.find({
|
||||
where: {
|
||||
@ -102,12 +108,6 @@ export class MigrateEmailFieldsToEmailsCommand extends ActiveWorkspacesCommandRu
|
||||
},
|
||||
});
|
||||
|
||||
await this.migratePersonEmailFieldToEmailsField(
|
||||
workspaceId,
|
||||
workspaceQueryRunner,
|
||||
dataSourceMetadata,
|
||||
);
|
||||
|
||||
for (const customFieldWithEmailType of customFieldsWithEmailType) {
|
||||
const objectMetadata = await this.objectMetadataRepository.findOne({
|
||||
where: { id: customFieldWithEmailType.objectMetadataId },
|
||||
|
||||
Reference in New Issue
Block a user