Skip to content

fix(deploy): pin prisma config for webhook migrations - #247

Merged
LucasSantana-Dev merged 1 commit into
mainfrom
fix/deploy-prisma-config
Mar 14, 2026
Merged

LucasSantana-Dev merged 1 commit into
mainfrom
fix/deploy-prisma-config

Conversation

@LucasSantana-Dev

@LucasSantana-Dev LucasSantana-Dev commented Mar 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • pin webhook-driven Prisma migrate commands to prisma/prisma.config.ts
  • keep homelab deploys deterministic when the webhook container invokes one-off backend migrations
  • document the deploy-specific Prisma requirement

Verification

  • bash -n scripts/deploy.sh
  • reproduced the failure on server-do-luk from the webhook container path
  • reran the same migrate commands successfully after pinning the config path in the host hotfix

Summary by CodeRabbit

  • Bug Fixes

    • Resolved DATABASE_URL resolution inconsistencies during Prisma migrations initiated from the webhook container, ensuring stable behavior across deployments.
  • Documentation

    • Updated CHANGELOG and README with configuration requirements and guidance for webhook-driven database migrations.

@vercel

vercel Bot commented Mar 14, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lucky Ready Ready Preview, Comment Mar 14, 2026 5:52pm

Request Review

@netlify

netlify Bot commented Mar 14, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for regal-bunny-0c8efe ready!

Name Link
🔨 Latest commit 52861e2
🔍 Latest deploy log https://app.netlify.com/projects/regal-bunny-0c8efe/deploys/69b5a0281bb1710008440fd9
😎 Deploy Preview https://deploy-preview-247--regal-bunny-0c8efe.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Mar 14, 2026 •

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR pins explicit Prisma configuration and schema file paths (--config and --schema) in the deploy script's migration commands to ensure deterministic DATABASE_URL resolution when executed from the webhook container. Documentation is updated to reflect this requirement.

Changes

Cohort / File(s) Summary
Documentation
CHANGELOG.md, README.md
Added documentation explaining that webhook-driven Prisma migrate commands must be pinned to prisma/prisma.config.ts and prisma/schema.prisma for stable DATABASE_URL resolution.
Deployment Script
scripts/deploy.sh
Updated prisma migrate deploy and migrate status invocations to include explicit --config and --schema file path flags.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Suggested labels

infra, ci, size/s

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(deploy): pin prisma config for webhook migrations' directly and accurately summarizes the main change: pinning Prisma configuration for webhook-driven migrations to ensure deterministic behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/deploy-prisma-config
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@LucasSantana-Dev
LucasSantana-Dev enabled auto-merge (squash) March 14, 2026 17:52
@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@LucasSantana-Dev
LucasSantana-Dev merged commit 8a2403d into main Mar 14, 2026
14 of 15 checks passed
@LucasSantana-Dev
LucasSantana-Dev deleted the fix/deploy-prisma-config branch March 15, 2026 14:07

This branch was successfully deployed

1 active deployment
Preview — 52861e29 Deployed Mar 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant