Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 20, 2025

Description

Upgrades Prisma ORM from v6 to v7 following the official migration guide. Prisma 7 requires datasource URLs in prisma.config.ts instead of schema.prisma, and uses database adapters for connections.

Fixes #(issue)

Dependencies:

  • @prisma/client: ^6.3.0 → ^7.0.0
  • prisma: ^6.2.1 → ^7.0.0
  • Added @prisma/adapter-pg: ^7.0.0

Changes:

  • Created prisma.config.ts with datasource configuration
  • Updated PrismaService to use PrismaPg adapter for connections
  • Removed deprecated metrics preview feature from schema
  • Removed $metrics API from metrics controller (deprecated in 6.14+, removed in 7.0)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Documentation update

How Has This Been Tested?

  • New unit tests
  • New integrated tests
  • New component tests
  • New end-to-end tests
  • New user flow tests
  • No new tests are required
  • Manual tests (description below)
  • Updated existing tests

All existing tests (29 unit + 1 e2e) pass. Coverage maintained at 92.56%.

Checklist

  • I have read the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have already been accepted and merged

Further comments

Connection logic unchanged - PgBouncer support and schema selection work identically. Metrics endpoint now returns application metrics only (Prisma-specific metrics removed per deprecation).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • checkpoint.prisma.io
    • Triggering command: /usr/local/bin/node /home/REDACTED/work/quickstart-openshift/quickstart-openshift/backend/node_modules/prisma/build/child {"product":"prisma","version":"6.18.0","cli_install_type":"local","information":"","local_timestamp":"2025-11-20T03:23:57Z","project_hash":"65cbeaa9","cli_path":"/home/REDACTED/work/quickstart-openshift/quickstart-openshift/backend/node_modules/.bin/prisma","cli_path_hash":"8cb6b250","endpoint":"REDACTED","disable":false,"arch":"x64","os":"linux","node_version":"v20.19.5","ci":true,"ci_name":"GitHub Actions","command":"generate --postinstall \"UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING\"","schema_providers":["postgresql"],"schema_preview_features":["metrics"],"schema_generators_providers":["prisma-client-js"],"cache_file":"/home/REDACTED/.cache/checkpoint-nodejs/prisma-8cb6b250","cache_duration":43200000,"remind_duration":172800000,"force":false,"timeout":5000,"unref":true,"child_path":"/home/REDACTED/work/quickstart-openshift/quickstart-openshift/backend/node_modules/prisma/build/child","client_event_id":"","previous_client_event_id":"","check_if_update_available":true} (dns block)
    • Triggering command: /usr/local/bin/node /home/REDACTED/work/quickstart-openshift/quickstart-openshift/backend/node_modules/prisma/build/child {"product":"prisma","version":"6.18.0","cli_install_type":"local","information":"","local_timestamp":"2025-11-20T03:24:07Z","project_hash":"65cbeaa9","cli_path":"/home/REDACTED/work/quickstart-openshift/quickstart-openshift/backend/node_modules/.bin/prisma","cli_path_hash":"8cb6b250","endpoint":"REDACTED","disable":false,"arch":"x64","os":"linux","node_version":"v20.19.5","ci":true,"ci_name":"GitHub Actions","command":"generate","schema_providers":["postgresql"],"schema_preview_features":["metrics"],"schema_generators_providers":["prisma-client-js"],"cache_file":"/home/REDACTED/.cache/checkpoint-nodejs/prisma-8cb6b250","cache_duration":43200000,"remind_duration":172800000,"force":false,"timeout":5000,"unref":true,"child_path":"/home/REDACTED/work/quickstart-openshift/quickstart-openshift/backend/node_modules/prisma/build/child","client_event_id":"","previous_client_event_id":"","check_if_update_available":true} (dns block)
    • Triggering command: /usr/local/bin/node /home/REDACTED/work/quickstart-openshift/quickstart-openshift/backend/node_modules/prisma/build/child {"product":"prisma","version":"7.0.0","cli_install_type":"local","information":"","local_timestamp":"2025-11-20T03:27:30Z","project_hash":"65cbeaa9","cli_path":"/home/REDACTED/work/quickstart-openshift/quickstart-openshift/backend/node_modules/.bin/prisma","cli_path_hash":"8cb6b250","endpoint":"REDACTED","disable":false,"arch":"x64","os":"linux","node_version":"v20.19.5","ci":true,"ci_name":"GitHub Actions","command":"generate","schema_providers":[],"schema_preview_features":[],"schema_generators_providers":[],"cache_file":"/home/REDACTED/.cache/checkpoint-nodejs/prisma-8cb6b250","cache_duration":43200000,"remind_duration":172800000,"force":false,"timeout":5000,"unref":true,"child_path":"/home/REDACTED/work/quickstart-openshift/quickstart-openshift/backend/node_modules/prisma/build/child","client_event_id":"","previous_client_event_id":"","check_if_update_available":true} (dns block)
  • scarf.sh
    • Triggering command: node ./report.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>task: upgrade to Prisma 7 with migration</issue_title>
<issue_description>Migration guide.
https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-7#upgrade-the-prisma-and-prismaclient-packages-to-v7</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: DerekRoberts <4391600+DerekRoberts@users.noreply.github.com>
Co-authored-by: DerekRoberts <4391600+DerekRoberts@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade to Prisma 7 with migration Upgrade to Prisma ORM 7 Nov 20, 2025
Copilot finished work on behalf of DerekRoberts November 20, 2025 03:38
Copilot AI requested a review from DerekRoberts November 20, 2025 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

task: upgrade to Prisma 7 with migration

2 participants