fix(db): explicit TypeORM column types for nullable string/uuid columns
`string | null` / `uuid | null` columns reflect as Object and crash the backend at metadata build (DataTypeNotSupportedError). Declare explicit `type` on users.phone/email and cluster_allocation_logs FK id columns. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,9 @@ export class ClusterAllocationLog {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
// Explicit `type` required: `string | null` reflects as Object and crashes
|
||||
// TypeORM at metadata build (DataTypeNotSupportedError).
|
||||
@Column({ type: 'uuid', nullable: true })
|
||||
applicationId?: string | null;
|
||||
|
||||
@ManyToOne(() => Application, { nullable: true, onDelete: 'SET NULL' })
|
||||
@@ -27,14 +29,14 @@ export class ClusterAllocationLog {
|
||||
@Column()
|
||||
userId: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@Column({ type: 'uuid', nullable: true })
|
||||
poolId?: string | null;
|
||||
|
||||
@ManyToOne(() => ClusterPool, { nullable: true, onDelete: 'SET NULL' })
|
||||
@JoinColumn({ name: 'poolId' })
|
||||
pool: ClusterPool;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@Column({ type: 'uuid', nullable: true })
|
||||
selectedClusterId?: string | null;
|
||||
|
||||
@ManyToOne(() => Cluster, { nullable: true, onDelete: 'SET NULL' })
|
||||
|
||||
Reference in New Issue
Block a user