fix: reenable member invites

This commit is contained in:
Henry
2025-05-22 12:18:56 +01:00
parent 82ec18e95e
commit 71c92eea27
16 changed files with 2183 additions and 231 deletions

View File

@@ -54,9 +54,8 @@ export const workspaceRelations = relations(workspaces, ({ one, many }) => ({
export const workspaceMembers = pgTable("workspace_members", {
id: bigserial("id", { mode: "number" }).primaryKey(),
publicId: varchar("publicId", { length: 12 }).notNull().unique(),
userId: uuid("userId")
.notNull()
.references(() => users.id),
email: varchar("email", { length: 255 }).notNull(),
userId: uuid("userId").references(() => users.id),
workspaceId: bigint("workspaceId", { mode: "number" })
.notNull()
.references(() => workspaces.id, { onDelete: "cascade" }),