From 2570e4add97006507d3dfed07d4187f0ce14bc6c Mon Sep 17 00:00:00 2001 From: hailin Date: Sat, 10 Jan 2026 06:05:36 -0800 Subject: [PATCH] fix(file-service): specify explicit column types for TypeORM entities Fix DataTypeNotSupportedError by explicitly specifying PostgreSQL column types for nullable fields that TypeORM was incorrectly inferring as Object type. Co-Authored-By: Claude Opus 4.5 --- .../file-service/src/domain/entities/file.entity.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/services/file-service/src/domain/entities/file.entity.ts b/packages/services/file-service/src/domain/entities/file.entity.ts index 40a799f..ea9359b 100644 --- a/packages/services/file-service/src/domain/entities/file.entity.ts +++ b/packages/services/file-service/src/domain/entities/file.entity.ts @@ -34,7 +34,7 @@ export class FileEntity { @Index() userId: string; - @Column({ name: 'conversation_id', nullable: true }) + @Column({ name: 'conversation_id', type: 'uuid', nullable: true }) @Index() conversationId: string | null; @@ -56,7 +56,7 @@ export class FileEntity { @Column({ type: 'enum', enum: FileStatus, default: FileStatus.UPLOADING }) status: FileStatus; - @Column({ name: 'thumbnail_path', nullable: true }) + @Column({ name: 'thumbnail_path', type: 'varchar', nullable: true }) thumbnailPath: string | null; @Column({ type: 'jsonb', nullable: true }) @@ -65,7 +65,7 @@ export class FileEntity { @Column({ name: 'extracted_text', type: 'text', nullable: true }) extractedText: string | null; - @Column({ name: 'error_message', nullable: true }) + @Column({ name: 'error_message', type: 'varchar', nullable: true }) errorMessage: string | null; @CreateDateColumn({ name: 'created_at' }) @@ -74,6 +74,6 @@ export class FileEntity { @UpdateDateColumn({ name: 'updated_at' }) updatedAt: Date; - @Column({ name: 'deleted_at', nullable: true }) + @Column({ name: 'deleted_at', type: 'timestamp', nullable: true }) deletedAt: Date | null; }