refactor: add organizations system

This commit is contained in:
Mauricio Siu
2025-02-09 20:53:06 -06:00
parent fafc238e70
commit 8bd72a8a34
47 changed files with 359 additions and 171 deletions

View File

@@ -2,7 +2,7 @@ import { pgTable, text, timestamp } from "drizzle-orm/pg-core";
import { user } from "./user";
// OLD TABLE
export const sessionTable = pgTable("session", {
export const session = pgTable("session", {
id: text("id").primaryKey(),
expiresAt: timestamp("expires_at").notNull(),
token: text("token").notNull().unique(),
@@ -14,4 +14,5 @@ export const sessionTable = pgTable("session", {
.notNull()
.references(() => user.id),
impersonatedBy: text("impersonated_by"),
activeOrganizationId: text("active_organization_id"),
});