diff --git a/apps/server/src/shared/domain/entity/boardnode/boardnode.entity.ts b/apps/server/src/shared/domain/entity/boardnode/boardnode.entity.ts index 9877f6a1e4f..282a3c9c981 100644 --- a/apps/server/src/shared/domain/entity/boardnode/boardnode.entity.ts +++ b/apps/server/src/shared/domain/entity/boardnode/boardnode.entity.ts @@ -8,6 +8,7 @@ import { BoardDoBuilder, BoardNodeType } from './types'; const PATH_SEPARATOR = ','; @Entity({ tableName: 'boardnodes', discriminatorColumn: 'type', abstract: true }) +@Index({ properties: ['path', 'type'] }) export abstract class BoardNode extends BaseEntityWithTimestamps { constructor(props: BoardNodeProps) { super(); @@ -23,7 +24,6 @@ export abstract class BoardNode extends BaseEntityWithTimestamps { this.title = props.title; } - @Index() @Property({ nullable: false }) path: string; @@ -33,7 +33,6 @@ export abstract class BoardNode extends BaseEntityWithTimestamps { @Property({ nullable: false }) position: number; - @Index() @Enum(() => BoardNodeType) type!: BoardNodeType;