summary refs log tree commit diff
path: root/src/util/entities/Invite.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/entities/Invite.ts')
-rw-r--r--src/util/entities/Invite.ts4
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 })