typeORM: "message": "Data type \"Object\" in \"..." is not supported by \"postgres\" database." typeORM: "message": "Data type \"Object\" in \"..." is not supported by \"postgres\" database." typescript typescript

typeORM: "message": "Data type \"Object\" in \"..." is not supported by \"postgres\" database."


You need to provide a data type explicitly.

@Column({ type: 'varchar', nullable: true })name: string | null;


The issue stems from this part right here:

@Column({ nullable: true })name!: string | null;

When creating a union type, the reflected type will be Object.An easy way to overcome it will be to do something like:

@Column({ nullable: true })name?: string;