diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-08-13 20:45:51 +0200 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-18 23:58:17 +1100 |
commit | 743035279f96536dd9908758f72ec4cd2da61467 (patch) | |
tree | 5e649120d5acdc0efbad5241e453a76b98f13da6 | |
parent | Made nitro stuff make some sense (diff) | |
download | server-743035279f96536dd9908758f72ec4cd2da61467.tar.xz |
Do the funny thing (make user->invite cascade delet)
-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 }) |