diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/util/entities/Invite.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/entities/Invite.ts b/src/util/entities/Invite.ts index ad4fd6db..8f5619fc 100644 --- a/src/util/entities/Invite.ts +++ b/src/util/entities/Invite.ts @@ -61,7 +61,9 @@ export class Invite extends BaseClassWithoutId { inviter_id?: string; @JoinColumn({ name: "inviter_id" }) - @ManyToOne(() => User) + @ManyToOne(() => User, { + onDelete: "CASCADE" + }) inviter: User; @Column({ nullable: true }) |