Refactor standard relations update at custom object renaming (#8638)
Refactoring update of standard relations when a custom object is renamed, after observing occasional issues. --------- Co-authored-by: Weiko <corentin@twenty.com>
This commit is contained in:
@ -424,14 +424,14 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
|
||||
existingObjectMetadata,
|
||||
);
|
||||
|
||||
if (!(newTargetTableName === existingTargetTableName)) {
|
||||
if (newTargetTableName !== existingTargetTableName) {
|
||||
await this.objectMetadataMigrationService.createRenameTableMigration(
|
||||
existingObjectMetadata,
|
||||
objectMetadataForUpdate,
|
||||
objectMetadataForUpdate.workspaceId,
|
||||
);
|
||||
|
||||
await this.objectMetadataMigrationService.createRelationsUpdatesMigrations(
|
||||
await this.objectMetadataMigrationService.createStandardRelationsUpdatesMigrations(
|
||||
existingObjectMetadata,
|
||||
objectMetadataForUpdate,
|
||||
objectMetadataForUpdate.workspaceId,
|
||||
|
||||
Reference in New Issue
Block a user