feat(db): setup drizzle config, client and package scripts
- Add drizzle.config.ts with PostgreSQL dialect configuration - Create lib/db/index.ts with Drizzle ORM client and pg Pool - Add db:generate, db:migrate, db:studio, db:push scripts to package.json Part of Chunk 1: Drizzle Config & DB Client setup
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { drizzle } from "drizzle-orm/node-postgres"
|
||||
import { Pool } from "pg"
|
||||
import * as schema from "./schema"
|
||||
|
||||
const pool = new Pool({
|
||||
connectionString: process.env.DATABASE_URL,
|
||||
})
|
||||
|
||||
export const db = drizzle(pool, { schema })
|
||||
Reference in New Issue
Block a user