fix(minting): rename DATABASE_URL → MINTING_DATABASE_URL#525
Open
blove wants to merge 1 commit into
Open
Conversation
…n integration override
The Neon Vercel integration injects DATABASE_URL (and DATABASE_URL_UNPOOLED,
POSTGRES_URL, etc.) pointing at the default `neondb` database — overriding
any project-level DATABASE_URL value we set. This caused the minting webhook
to connect to `neondb` (which doesn't have our schema) instead of the
`minting` database that owns processed_events + licenses.
Use a non-conflicting var name so the integration can't shadow it.
Run book:
- Set MINTING_DATABASE_URL on the threadplane-minting-service Vercel
project to the pooled connection string for the `minting` database.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DATABASE_URL, which always points at the defaultneondbdatabasemintingdatabase (separate schema forprocessed_events,licenses) — using a non-conflicting var name prevents shadowingWhy
End-to-end smoke kept failing with
relation "processed_events" does not exist. Diagnostics confirmed Vercel was injectingDATABASE_URL=postgres://.../neondbat runtime even though the project-level env was set topostgres://.../minting. The Neon integration ships its ownDATABASE_URL,DATABASE_URL_UNPOOLED,POSTGRES_URL, etc., and those win.Run-book
After merge, set
MINTING_DATABASE_URLon thethreadplane-minting-serviceVercel project (production + preview) to the pooled connection string for themintingdatabase. The legacyDATABASE_URLcan stay or be removed; it's no longer read.Test plan
processed_events+licensesrows insert🤖 Generated with Claude Code