feat(01-01): define DB schema, configure Drizzle Kit, write seed script
- Created src/lib/db/schema.ts with users table (id, email, password_hash, created_at) - Created src/lib/db/index.ts exporting db singleton via Drizzle + Neon HTTP driver - Created drizzle.config.ts pointing to schema.ts with postgresql dialect - Created scripts/seed.ts reading AGENT_EMAIL/AGENT_PASSWORD to create hashed user row - Generated drizzle/0000_milky_black_cat.sql migration (committed per user decision) - db:migrate and db:seed pending user Neon database setup
This commit is contained in:
8
teressa-copeland-homes/src/lib/db/schema.ts
Normal file
8
teressa-copeland-homes/src/lib/db/schema.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { pgTable, text, timestamp } from "drizzle-orm/pg-core";
|
||||
|
||||
export const users = pgTable("users", {
|
||||
id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
|
||||
email: text("email").notNull().unique(),
|
||||
passwordHash: text("password_hash").notNull(),
|
||||
createdAt: timestamp("created_at").defaultNow().notNull(),
|
||||
});
|
||||
Reference in New Issue
Block a user