Conversation
## 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 -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )