Skip to content

Conversation

@ishaksebsib
Copy link
Contributor

Problem

The drizzle configuration was using config() from dotenv without specifying a path, which caused inconsistent loading of .env.local files in the drizzle-kit execution context. This resulted in DATABASE_URL being undefined, causing drizzle-kit to fall back to the default database connection (postgres://localhost:5432/workflow) instead of loading the correct database URL from .env.local.

Solution

Updated drizzle.config.ts to explicitly load both .env and .env.local files:

  • .env loads first with base configuration
  • .env.local loads second and can override values

Testing

  • pnpm db:push now correctly loads environment variables from .env.local
  • No more fallback to the default database connection

@vercel
Copy link
Contributor

vercel bot commented Nov 27, 2025

@ishaksebsib is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant