This commit is contained in:
David Senoner 2025-05-18 13:18:46 +02:00
commit 0738070ce1
287 changed files with 10116 additions and 0 deletions

View file

@ -0,0 +1,16 @@
import { integer, pgTable, text, timestamp } from "drizzle-orm/pg-core";
export const users = pgTable("users", {
id: text().primaryKey(),
age: integer(),
username: text().notNull().unique(),
passwordHash: text().notNull(),
});
export const sessions = pgTable("sessions", {
id: text().primaryKey(),
userId: text()
.notNull()
.references(() => users.id),
expiresAt: timestamp({ withTimezone: true, mode: "date" }).notNull(),
});