From f3fe3abf7108806eb70cb395b7df2afe153c30a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Malfait?= Date: Tue, 15 Oct 2024 17:50:39 +0200 Subject: [PATCH] Fix unique index created twice (#7718) `isUnique` was passed to TypeORM's column creation API resulting in double index creation because it's already done via the decorator and then in `WorkspaceMigrationIndexFactory` It would be interesting to move it at this field level in a later step, which is why I also fixed `CompositeColumnActionFactory` to pass isUnique on the correct columns, even though it's being ignored later on --- .../factories/composite-column-action.factory.ts | 5 ++++- .../workspace-migration-runner.service.ts | 5 ++++- .../person/standard-objects/person.workspace-entity.ts | 4 +--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/twenty-server/src/engine/metadata-modules/workspace-migration/factories/composite-column-action.factory.ts b/packages/twenty-server/src/engine/metadata-modules/workspace-migration/factories/composite-column-action.factory.ts index 7438e7a8559b..0051d7293a65 100644 --- a/packages/twenty-server/src/engine/metadata-modules/workspace-migration/factories/composite-column-action.factory.ts +++ b/packages/twenty-server/src/engine/metadata-modules/workspace-migration/factories/composite-column-action.factory.ts @@ -183,7 +183,10 @@ export class CompositeColumnActionFactory extends ColumnActionAbstractFactory