diff options
author | Featyre <88265031+Featyre@users.noreply.github.com> | 2022-02-01 16:54:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-01 16:54:50 +0000 |
commit | 862c80b3433d9cbdf1a0192b9a069a2d6661bcd4 (patch) | |
tree | 01d7a92d7b58441be9fbbc21b53d2fd3d7ac6fed /util | |
parent | A few minor changes (diff) | |
parent | Merge pull request #612 from ImAaronFR/patch-3 (diff) | |
download | server-862c80b3433d9cbdf1a0192b9a069a2d6661bcd4.tar.xz |
Merge branch 'fosscord:master' into master
Diffstat (limited to 'util')
-rw-r--r-- | util/src/entities/Message.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/util/src/entities/Message.ts b/util/src/entities/Message.ts index 20a44ca3..e577d5df 100644 --- a/util/src/entities/Message.ts +++ b/util/src/entities/Message.ts @@ -84,8 +84,10 @@ export class Message extends BaseClass { @RelationId((message: Message) => message.member) member_id: string; - @JoinColumn({ name: "member_id" }) - @ManyToOne(() => Member) + @JoinColumn({ name: "author_id", referencedColumnName: "id" }) + @ManyToOne(() => User, { + onDelete: "CASCADE", + }) member?: Member; @Column({ nullable: true }) |