added passwordHash and createdAt/updatedAt to user table

This commit is contained in:
Oliver Bryan
2025-12-22 03:16:29 +00:00
parent 2eae751fdb
commit 9fe26017d3
4 changed files with 276 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
import { integer, pgTable, uniqueIndex, varchar } from "drizzle-orm/pg-core";
import { integer, pgTable, timestamp, uniqueIndex, varchar } from "drizzle-orm/pg-core";
import { createInsertSchema, createSelectSchema } from "drizzle-zod";
import { z } from "zod";
@@ -6,6 +6,9 @@ export const User = pgTable("User", {
id: integer().primaryKey().generatedAlwaysAsIdentity(),
name: varchar({ length: 256 }).notNull(),
username: varchar({ length: 32 }).notNull().unique(),
passwordHash: varchar({ length: 255 }).notNull(),
createdAt: timestamp({ withTimezone: false }).defaultNow(),
updatedAt: timestamp({ withTimezone: false }).defaultNow(),
});
export const Project = pgTable("Project", {