Files
sass-mohfarawati/drizzle.config.ts
T
Moh ba63f75ea8
CI / quality (push) Waiting to run
REFACTORED - Replace Prisma with Drizzle ORM
- Add lib/db (schema, postgres.js client, enums, seed, migrations) on Drizzle
- Rewrite all lib and admin action queries from Prisma to Drizzle
- Keep existing table/column names so no data migration is needed
- Preserve signed-cookie admin auth unchanged
- Map unique-violation handling from Prisma P2002 to SQLSTATE 23505
- Swap deps, scripts, Makefile, and Dockerfile from Prisma to Drizzle
2026-08-08 02:09:03 +02:00

14 lines
353 B
TypeScript

import type { Config } from "drizzle-kit";
const rawConnectionString =
process.env.DATABASE_URL ?? "postgresql://postgres:postgres@localhost:5432/moh_sass";
export default {
schema: "./lib/db/schema.ts",
out: "./lib/db/migrations",
dialect: "postgresql",
dbCredentials: {
url: rawConnectionString.split("?")[0],
},
} satisfies Config;