Add branch deploy restoration strategy document#845
Add branch deploy restoration strategy document#845marcodejongh wants to merge 2 commits intomainfrom
Conversation
Documents the full plan to restore branch deploys across Vercel, Railway, and Neon, broken into four independently valuable phases: quick-win frontend-only previews, full-stack branch deploys, API consolidation, and sync migration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Claude Review✅ Ready to merge - Minor issue noted below, but nothing blocking.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21e5ff53cb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| **Change in `vercel.json`:** | ||
| ```json | ||
| { | ||
| "buildCommand": "npm run db:migrate && npm run build --workspace=@boardsesh/web" |
There was a problem hiding this comment.
Keep preview migrations off the production database
The proposed buildCommand runs npm run db:migrate on every preview deployment, which means unmerged PR code can apply schema changes to production before review/merge. This is a production-safety regression even if migrations are usually additive, because preview builds execute on each push and can include destructive or incompatible SQL from feature branches.
Useful? React with 👍 / 👎.
| -d '{ | ||
| "branch": { | ||
| "name": "pr-${PR_NUMBER}", | ||
| "parent_id": "${MAIN_BRANCH_ID}" |
There was a problem hiding this comment.
Expand shell variables in Neon branch creation example
This curl example wraps the JSON payload in single quotes, so ${PR_NUMBER} and ${MAIN_BRANCH_ID} are sent literally instead of being expanded by the shell. If copied as written, the branch creation request will use placeholder strings and fail or create incorrectly named resources, blocking the Phase 2 setup flow.
Useful? React with 👍 / 👎.
Migrations are idempotent so they're safe to run against the production database on preview deploys. The skip was a workaround for the broken Neon branching integration — removing it restores preview deploy functionality (Phase 1 of branch deploy restoration). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
docs/branch-deploys.md— a comprehensive, actionable plan to restore branch deploys across the full stack (Vercel, Railway, Neon)Phases
NEXT_PUBLIC_WS_URLfor preview scope, add change detection workflowbackendUrloverride, cleanup on PR closeTest plan
🤖 Generated with Claude Code