dokploy/server/db/schema/session.ts
2024-06-05 22:42:11 -06:00

14 lines
363 B
TypeScript

import { auth } from "./auth";
import { pgTable, text, timestamp } from "drizzle-orm/pg-core";
export const sessionTable = pgTable("session", {
id: text("id").primaryKey(),
userId: text("user_id")
.notNull()
.references(() => auth.id, { onDelete: "cascade" }),
expiresAt: timestamp("expires_at", {
withTimezone: true,
mode: "date",
}).notNull(),
});