refactor: update name

This commit is contained in:
Mauricio Siu
2025-02-10 02:13:52 -06:00
parent b7112b89fd
commit 6179cef1ee
16 changed files with 249 additions and 446 deletions

View File

@@ -1,3 +1,4 @@
import { sql } from "drizzle-orm";
import { pgTable, text, timestamp } from "drizzle-orm/pg-core";
import { user } from "./user";
@@ -5,14 +6,14 @@ import { user } from "./user";
export const session = pgTable("session", {
id: text("id").primaryKey(),
expiresAt: timestamp("expires_at").notNull(),
token: text("token").notNull().unique(),
// token: text("token").notNull().unique().default(sql`gen_random_uuid()`),
createdAt: timestamp("created_at").notNull(),
updatedAt: timestamp("updated_at").notNull(),
ipAddress: text("ip_address"),
userAgent: text("user_agent"),
userId: text("user_id")
.notNull()
.references(() => user.id),
.references(() => user.userId),
impersonatedBy: text("impersonated_by"),
activeOrganizationId: text("active_organization_id"),
});