Make guild channels nullable

This commit is contained in:
Rory& 2025-07-11 13:25:23 +02:00
parent a5bb6a9b5d
commit 72ba6e02b1

View File

@ -72,9 +72,9 @@ export const PublicGuildRelations = [
engine: dbEngine,
})
export class Guild extends BaseClass {
@Column({ nullable: true })
@Column({ type: String, nullable: true })
@RelationId((guild: Guild) => guild.afk_channel)
afk_channel_id?: string;
afk_channel_id?: string | null;
@JoinColumn({ name: "afk_channel_id" })
@ManyToOne(() => Channel)
@ -231,17 +231,17 @@ export class Guild extends BaseClass {
@Column()
premium_tier?: number; // crowd premium level
@Column({ nullable: true })
@Column({ type: String, nullable: true })
@RelationId((guild: Guild) => guild.public_updates_channel)
public_updates_channel_id: string;
public_updates_channel_id: string | null;
@JoinColumn({ name: "public_updates_channel_id" })
@ManyToOne(() => Channel)
public_updates_channel?: Channel;
@Column({ nullable: true })
@Column({ type: String, nullable: true })
@RelationId((guild: Guild) => guild.rules_channel)
rules_channel_id?: string;
rules_channel_id?: string | null;
@JoinColumn({ name: "rules_channel_id" })
@ManyToOne(() => Channel)
@ -253,9 +253,9 @@ export class Guild extends BaseClass {
@Column({ nullable: true })
splash?: string;
@Column({ nullable: true })
@Column({ type: String, nullable: true })
@RelationId((guild: Guild) => guild.system_channel)
system_channel_id?: string;
system_channel_id?: string | null;
@JoinColumn({ name: "system_channel_id" })
@ManyToOne(() => Channel)