Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
Commit67f64a3unknown_key

fix(drizzle): explicit error when DATABASE_URL is unset

fix(drizzle): explicit error when DATABASE_URL is unset

Previously `process.env.DATABASE_URL!` would type-coerce undefined to
string, then drizzle-kit would explode deep inside its config parser
with an obscure stack. Replace the non-null assertion with an explicit
guard so missing-env failures surface a clean, actionable message at
the top of the run.
Claude committed on May 16, 2026Parent: d7ba05d
1 file changed+9167f64a31fc74bfd839b7a87a913068609892f74a
1 changed file+9−1
Modifieddrizzle.config.ts+9−1View fileUnifiedSplit
11import { defineConfig } from "drizzle-kit";
22
3const databaseUrl = process.env.DATABASE_URL;
4if (!databaseUrl) {
5 throw new Error(
6 "DATABASE_URL is not set. Required for drizzle-kit (generate / migrate / studio). " +
7 "Set it in your environment or .env file before running drizzle-kit commands."
8 );
9}
10
311export default defineConfig({
412 schema: "./src/db/schema.ts",
513 out: "./drizzle",
614 dialect: "postgresql",
715 dbCredentials: {
8 url: process.env.DATABASE_URL!,
16 url: databaseUrl,
917 },
1018});
1119