auth aint working, trying new version

This commit is contained in:
2024-12-16 23:25:14 -05:00
parent 0bf9011cc6
commit d3ab4df010
30 changed files with 37 additions and 620 deletions

View File

@@ -1,10 +1,10 @@
import { pgTable, text, timestamp } from "drizzle-orm/pg-core";
import {user} from '@schemas/schema';
import {users} from '@schemas/schema';
export const sessions = pgTable("session", {
sessionToken: text("sessionToken").primaryKey(),
userId: text("userId")
.notNull()
.references(() => user.id, { onDelete: "cascade" }),
.references(() => users.id, { onDelete: "cascade" }),
expires: timestamp("expires", { mode: "date" }).notNull(),
})