import { defineConfig } from "drizzle-kit"; // `drizzle-kit generate` reads the schema only and does NOT need a // connection string; `drizzle-kit push` / `studio` / `migrate` do. We // therefore allow the URL to be absent at config eval time and let the // individual drizzle-kit commands surface their own clearer errors. const url = process.env.DATABASE_URL ?? "postgres://placeholder@localhost:5432/placeholder"; export default defineConfig({ dialect: "postgresql", schema: "./db/schema.ts", out: "./db/migrations", dbCredentials: { url }, strict: true, verbose: true, });