From 49d8a7728e48b87df28ac1f7649a019d247a2a90 Mon Sep 17 00:00:00 2001 From: KagChi Date: Sun, 11 Feb 2024 20:02:22 +0700 Subject: [PATCH] fix: remove guilds relation --- src/Schema/collections/channel.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Schema/collections/channel.ts b/src/Schema/collections/channel.ts index deffa62d..48bf548d 100644 --- a/src/Schema/collections/channel.ts +++ b/src/Schema/collections/channel.ts @@ -1,6 +1,5 @@ import { pgTable, text, integer, boolean } from "drizzle-orm/pg-core"; import { relations } from "drizzle-orm/relations"; -import { guilds } from "./guild.js"; import { voiceStates } from "./voice.js"; export const channelsOverwrite = pgTable("channels_overwrite", { @@ -40,11 +39,7 @@ export const channelsOverwriteRelation = relations(channelsOverwrite, ({ one }) }) })); -export const channelsRelation = relations(channels, ({ one, many }) => ({ - guild: one(guilds, { - fields: [channels.id], - references: [guilds.id] - }), +export const channelsRelation = relations(channels, ({ many }) => ({ permission_overwrites: many(channelsOverwrite) }));