Skip to content

[pull] main from prisma:main#216

Merged
pull[bot] merged 1 commit intocode:mainfrom
prisma:main
Mar 3, 2026
Merged

[pull] main from prisma:main#216
pull[bot] merged 1 commit intocode:mainfrom
prisma:main

Conversation

@pull
Copy link

@pull pull bot commented Mar 3, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

## Summary

Migrates `prisma init --db` from reading deprecated
`database.directConnection` fields to the new
`connections[].endpoints.direct.connectionString` from the Management
API response
([TML-1927](https://linear.app/prisma-company/issue/TML-1927)).

- Reads the connection string directly from
`connections[].endpoints.direct.connectionString` — no manual DSN
construction needed
- Throws if no connection string is found (no legacy fallback — the API
always returns the new fields)
- Bumps `@prisma/management-api-sdk` from `0.2.0` to `1.12.0` to get the
new connection model types
- Updates SDK import names to match v1.12.0 exports (`ManagementAPI` ->
`ManagementApiSdk`, `createManagementAPI` -> `createManagementApiSdk`)
- Bumps `hono` from `4.11.7` to `4.12.3` to fix IP spoofing
authentication bypass vulnerability

## Context

The Management API shipped a new connection model in [PR
#3365](prisma/pdp-control-plane#3365). The
deprecated fields (`directConnection`, `apiKeys`) will be removed after
a deprecation window. This migration ensures `prisma init --db` works
with the new response shape.

Related: [PTL-1046](https://linear.app/prisma-company/issue/PTL-1046) —
same migration for `prisma/create-db` ([PR
#80](prisma/create-db#80))

## Test plan

- [x] `prisma init --db` creates a project and returns a valid
connection string (manual test against production API)
- [ ] Existing CI tests pass

Closes TML-1927

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved database connection detection to prefer available endpoint
types and surface a clearer error when no connection string is found.

* **Chores**
  * Updated management API integration to the newer SDK surface.
* Bumped devDependencies: @prisma/management-api-sdk to v1.12.0 and hono
to v4.12.3.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@pull pull bot locked and limited conversation to collaborators Mar 3, 2026
@pull pull bot added the ⤵️ pull label Mar 3, 2026
@pull pull bot merged commit 57641cb into code:main Mar 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant