summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-28 16:08:33 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-28 16:08:33 +1000
commitf75a7bac16ea54e431077534c4842d847ec997f5 (patch)
tree61f8a05026ec47b0a08e25fac92acaf14cadc296 /src
parentGenerate IDs for entities by default (diff)
downloadserver-f75a7bac16ea54e431077534c4842d847ec997f5.tar.xz
Use PrimaryIdColumn instead of PrimaryColumn in Invite and Category
Diffstat (limited to 'src')
-rw-r--r--src/util/entities/Categories.ts6
-rw-r--r--src/util/entities/Invite.ts5
2 files changed, 5 insertions, 6 deletions
diff --git a/src/util/entities/Categories.ts b/src/util/entities/Categories.ts
index f12b237d..8cf1e3a4 100644
--- a/src/util/entities/Categories.ts
+++ b/src/util/entities/Categories.ts
@@ -1,5 +1,5 @@
-import { PrimaryColumn, Column, Entity } from "typeorm";
-import { BaseClassWithoutId } from "./BaseClass";
+import { Column, Entity } from "typeorm";
+import { BaseClassWithoutId, PrimaryIdColumn } from "./BaseClass";
 
 // TODO: categories:
 // [{
@@ -19,7 +19,7 @@ import { BaseClassWithoutId } from "./BaseClass";
 export class Categories extends BaseClassWithoutId {
 	// Not using snowflake
 
-	@PrimaryColumn()
+	@PrimaryIdColumn()
 	id: number;
 
 	@Column({ nullable: true })
diff --git a/src/util/entities/Invite.ts b/src/util/entities/Invite.ts
index 90dec92a..ad4fd6db 100644
--- a/src/util/entities/Invite.ts
+++ b/src/util/entities/Invite.ts
@@ -4,10 +4,9 @@ import {
 	JoinColumn,
 	ManyToOne,
 	RelationId,
-	PrimaryColumn,
 } from "typeorm";
 import { Member } from "./Member";
-import { BaseClassWithoutId } from "./BaseClass";
+import { BaseClassWithoutId, PrimaryIdColumn } from "./BaseClass";
 import { Channel } from "./Channel";
 import { Guild } from "./Guild";
 import { User } from "./User";
@@ -16,7 +15,7 @@ export const PublicInviteRelation = ["inviter", "guild", "channel"];
 
 @Entity("invites")
 export class Invite extends BaseClassWithoutId {
-	@PrimaryColumn()
+	@PrimaryIdColumn()
 	code: string;
 
 	@Column()