Skip to content

Conversation

@ddeskov-limechain
Copy link
Contributor

@ddeskov-limechain ddeskov-limechain commented Jan 14, 2026

PROBLEM
CI pipeline was printing a requirement to update Prisma to the latest version. Upgrading to newer version introduced breaking changes.

SOLUTION
Version updated from 6 to 7 by following the guide https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-7

Solution was manually tested locally and appears to be working.

Solution passes the db and Prisma related tests.

Signed-off-by: Dian Deskov <[email protected]>
Signed-off-by: Dian Deskov <[email protected]>
@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.85%. Comparing base (1bf2072) to head (cd1d1ab).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2172      +/-   ##
==========================================
- Coverage   99.85%   99.85%   -0.01%     
==========================================
  Files         175      175              
  Lines        6832     6830       -2     
  Branches     1303     1315      +12     
==========================================
- Hits         6822     6820       -2     
  Misses         10       10              
Files with missing lines Coverage Δ
front-end/src/main/db/prisma.ts 100.00% <100.00%> (ø)
front-end/src/main/index.ts 95.50% <100.00%> (ø)

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Dian Deskov <[email protected]>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request upgrades Prisma ORM and Prisma Client from version 6 to version 7, following the official migration guide. The upgrade introduces breaking changes that required updates to configuration, imports, and build processes.

Changes:

  • Upgraded Prisma packages from 6.2.1 to 7.2.0 and added the @prisma/adapter-better-sqlite3 adapter
  • Modified Prisma client generation to use a custom output path (src/generated/prisma) instead of node_modules
  • Updated build configurations (Vite, TypeScript) to handle the new Prisma client location with proper aliasing
  • Added CI pipeline step to generate Prisma client before running tests

Reviewed changes

Copilot reviewed 16 out of 19 changed files in this pull request and generated no comments.

Show a summary per file
File Description
front-end/package.json Updated Prisma packages to version 7.2.0, added adapter package, and better-sqlite3 override
front-end/prisma/schema.prisma Updated generator to use custom output path and driverAdapters preview feature
front-end/prisma.config.ts Added Prisma 7 configuration file for schema and migrations paths
front-end/vite.config.ts Added Prisma client aliasing for browser and client builds with external filtering
front-end/tsconfig.*.json Updated TypeScript path mappings to point to generated Prisma client location
front-end/src/main/db/prisma.ts Updated to use adapter pattern with type assertion for constructor parameters
front-end/src/tests/main/db/prisma.spec.ts Updated tests to mock adapter and verify new initialization pattern
front-end/electron-builder.yml Updated asset paths for generated Prisma client location
.github/workflows/test-frontend.yaml Added Prisma client generation step before running tests
.gitignore Added generated Prisma client directory to ignore list
NOTICE Updated dependency attribution entries (license compliance)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@rbarker-dev rbarker-dev left a comment

Choose a reason for hiding this comment

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

Approve changes to test-frontend.yaml and .gitignore.

There's a snyk error that needs resolving though.

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.

3 participants