Skip to content

Commit b272ef7

Browse files
fix: add explicit timestamp type for Message.pinned_at column
TypeORM cannot infer the correct PostgreSQL column type for Date | null without an explicit type annotation. This caused a runtime DataTypeNotSupportedError when connecting to postgres. Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
1 parent c79b773 commit b272ef7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/util/entities/Message.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export class Message extends BaseClass {
190190
@Column({ nullable: true })
191191
pinned?: boolean;
192192

193-
@Column({ nullable: true })
193+
@Column({ type: "timestamp", nullable: true })
194194
pinned_at?: Date | null;
195195

196196
@Column({ type: "int" })

0 commit comments

Comments
 (0)