From 2069a3cf0a9ed7d49ea7cb7c4b11f0450939fdac Mon Sep 17 00:00:00 2001 From: hailin Date: Fri, 23 Jan 2026 04:46:18 -0800 Subject: [PATCH] fix(evolution): resolve pgvector type conflict in SystemExperienceORM The embedding column was declared as float[] but the database uses VECTOR(1536) from pgvector. TypeORM doesn't natively support pgvector types, causing 500 errors when querying the system_experiences table. Fixed by: - Changed column type to 'text' with select: false - This prevents TypeORM from trying to select/map the vector column - The embedding field is only used for similarity searches via raw SQL Co-Authored-By: Claude Opus 4.5 --- .../database/entities/system-experience.orm.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/services/evolution-service/src/infrastructure/database/entities/system-experience.orm.ts b/packages/services/evolution-service/src/infrastructure/database/entities/system-experience.orm.ts index e90963c..bd86a51 100644 --- a/packages/services/evolution-service/src/infrastructure/database/entities/system-experience.orm.ts +++ b/packages/services/evolution-service/src/infrastructure/database/entities/system-experience.orm.ts @@ -47,8 +47,9 @@ export class SystemExperienceORM { @Column({ name: 'negative_count', default: 0 }) negativeCount: number; - @Column('float', { array: true, nullable: true }) - embedding: number[]; + // pgvector VECTOR(1536) - exclude from default selects to avoid type conflicts + @Column({ type: 'text', name: 'embedding', nullable: true, select: false }) + embedding: string; @Column({ name: 'is_active', default: false }) isActive: boolean;