Skip to content

fix(db): point prisma.config.ts to schema directory for multi-file sc…#2422

Merged
Marfuen merged 1 commit intomainfrom
mariano/prisma-migrate-schema-dir
Apr 2, 2026
Merged

fix(db): point prisma.config.ts to schema directory for multi-file sc…#2422
Marfuen merged 1 commit intomainfrom
mariano/prisma-migrate-schema-dir

Conversation

@Marfuen
Copy link
Copy Markdown
Contributor

@Marfuen Marfuen commented Apr 2, 2026

…hema support in migrations

What does this PR do?

  • Fixes #XXXX (GitHub issue number)
  • Fixes COMP-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)

Visual Demo (For contributors especially)

A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).

Video Demo (if applicable):

  • Show screen recordings of the issue or feature.
  • Demonstrate how to reproduce the issue, the behavior before and after the change.

Image Demo (if applicable):

  • Add side-by-side screenshots of the original and updated change.
  • Highlight any significant change(s).

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

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

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Apr 2, 2026 2:42pm
comp-framework-editor Ready Ready Preview, Comment Apr 2, 2026 2:42pm
portal Ready Ready Preview, Comment Apr 2, 2026 2:42pm

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 2, 2026

PR Summary

Medium Risk
Changes Prisma’s schema source from a single file to a directory, which can affect migration/generation behavior if the combined schema differs or tooling expects schema.prisma. Risk is limited to build/migrate flows but impacts database workflows.

Overview
Updates Prisma configuration to treat prisma/schema as the schema source (enabling multi-file schemas) instead of the single prisma/schema.prisma path.

Adds a new prisma/schema/schema.prisma base schema file (generator/datasource) and adjusts scripts/combine-schemas.js to exclude schema.prisma from concatenation to avoid duplicating the base schema when producing the distributable combined schema.

Written by Cursor Bugbot for commit 8effcc7. This will update automatically on new commits. Configure here.

@Marfuen Marfuen merged commit 8a05e29 into main Apr 2, 2026
6 of 9 checks passed
@Marfuen Marfuen deleted the mariano/prisma-migrate-schema-dir branch April 2, 2026 14:41
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@@ -0,0 +1,10 @@
generator client {
provider = "prisma-client"
output = "../src/generated/prisma"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong generator output path in nested schema directory

High Severity

The output path "../src/generated/prisma" is resolved relative to the schema file's location. Since this file moved from prisma/schema.prisma to prisma/schema/schema.prisma (one directory deeper), .. now resolves to prisma/ instead of the package root. This means the Prisma client will be generated into prisma/src/generated/prisma instead of the intended src/generated/prisma, breaking all imports that depend on the generated client. The path needs to be ../../src/generated/prisma to account for the extra nesting level.

Fix in Cursor Fix in Web

claudfuen pushed a commit that referenced this pull request Apr 2, 2026
# [3.14.0](v3.13.1...v3.14.0) (2026-04-02)

### Bug Fixes

* add SSL support to PrismaPg adapter for RDS/staging (rejectUnauthorized: false) ([#2418](#2418)) ([451c6a1](451c6a1))
* **api:** pin prisma@7.6.0 in Dockerfile generate step (prevents stale v6 binary resolution) ([#2423](#2423)) ([13a7b77](13a7b77))
* **api:** upgrade Dockerfile base images for Prisma v7 Node.js requirement (bun 1.3.11, node 22) ([#2425](#2425)) ([dc9351c](dc9351c))
* **app:** comment button gets disabled with numbered formatting ([#2368](#2368)) ([0586dfe](0586dfe))
* **auth:** make Microsoft OAuth tenantId configurable via env var ([#2412](#2412)) ([ffb260b](ffb260b)), closes [#2411](#2411)
* **company:** make Access Request form options in Documents ([#2369](#2369)) ([f461c4d](f461c4d))
* **db:** point prisma.config.ts to schema directory for multi-file schema support in migrations ([#2422](#2422)) ([8a05e29](8a05e29))
* **db:** remove dotenv/config import from prisma.config.ts (not available in Docker build context) ([#2426](#2426)) ([a98cf93](a98cf93))
* **db:** use process.env fallback for DATABASE_URL in prisma.config.ts ([#2416](#2416)) ([3e29382](3e29382))
* default to SSL for non-localhost connections, remove buggy cleanUrl stripping ([#2430](#2430)) ([98213f8](98213f8))
* Enable 'Ready for Review' menu for client on Document Finding ([#2404](#2404)) ([12e5e3a](12e5e3a))
* handle stale Ramp sync provider in legacy orgs ([3d6d1d4](3d6d1d4))
* install ca-certificates before wget, clean apt after download ([#2433](#2433)) ([772ac48](772ac48))
* install ca-certificates before wget, clean apt after download ([#2434](#2434)) ([b7b7944](b7b7944))
* **portal:** remove getJwtToken and use session-cookie auth directly ([67aacf5](67aacf5))
* scope stale provider cleanup to ramp only ([a3313cd](a3313cd))
* set trigger.dev runtime to node-22 (Prisma v7 requires node >=20.19 || >=22.12) ([#2419](#2419)) ([f688334](f688334))
* strip sslmode from connection string before passing to pg (prevent double-parsing) ([#2420](#2420)) ([00e6f13](00e6f13))
* strip sslmode from DATABASE_URL to avoid conflict with explicit ssl option ([#2435](#2435)) ([335dcd2](335dcd2))
* use AWS RDS CA bundle for proper SSL verification, simplify client SSL config ([#2432](#2432)) ([863f14b](863f14b))
* use installed prisma binary instead of bunx (fixes prisma/config resolution in Docker) ([#2427](#2427)) ([fab6693](fab6693))
* use process.env fallback for DATABASE_URL in all prisma.config.ts files (build envs have no DB) ([#2417](#2417)) ([977a705](977a705))

### Features

* **app, api, framework-editor:** restructure compliance app and add framework editor CLI ([30516d4](30516d4))
* migrate prisma from v6 to v7 ([59e0db9](59e0db9))
* remove Ramp integration entirely ([a04c486](a04c486))
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.14.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants