fix(db): swap @neondatabase/serverless for postgres.js (local dev support)

Neon serverless driver requires remote WebSocket — incompatible with local
PostgreSQL. Replaced with postgres.js (drizzle-orm/postgres-js) in db/index.ts,
scripts/seed.ts, and drizzle.config.ts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Chandler Copeland
2026-03-19 14:00:32 -06:00
parent 8bc09e4ea7
commit 0a75442af3
4 changed files with 49 additions and 12 deletions

View File

@@ -1,11 +1,11 @@
import "dotenv/config";
import { drizzle } from "drizzle-orm/neon-http";
import { neon } from "@neondatabase/serverless";
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";
import { users } from "../src/lib/db/schema";
import bcrypt from "bcryptjs";
const sql = neon(process.env.DATABASE_URL!);
const db = drizzle({ client: sql });
const client = postgres(process.env.DATABASE_URL!);
const db = drizzle({ client });
async function seed() {
const email = process.env.AGENT_EMAIL;