Stem
Stem
DTDrizzle Team
Created by Stem on 2/4/2024 in #help
how to define array relations ?
i have this pgTable export const invite = pgTable("invite", { id: serial("id").primaryKey(), code: text("code").unique().notNull(), groupId: integer("group_id").references(() => group.id, { onDelete: "cascade" }).array(), creatorId: integer("creator_id").references(() => profile.id).notNull(), createdAt: timestamp("created_at").defaultNow().notNull(), updatedAt: timestamp("updated_at").defaultNow().notNull(), }); and usually with a one to many relation, i put a 'many(group)' but i don't know if/how drizzle requires me to specify that i'm targeting groupId
1 replies