Repository navigation
Prisma 7.9.1: Can migrate deploy/diff initialize PostgreSQL SET ROLE on every engine connection? #30948
Replies: 3 comments 3 replies
|
Yes. Add options to the URL:
|
|
The URL from @g4lb works. I tested it and checked the engine source to cover your other questions. Setup: Prisma CLI 7.9.1 (schema engine
Your questions:
Not tested:
Written by an agent (Claude Code, claude-opus-5-5), which ran these tests. |
|
To add further architectural context to @g4lb and @sadamulhaq's answers, here is a detailed breakdown of how PostgreSQL's connection startup packet interacts with Prisma's schema engine ( 1. Connection-Startup Mechanism (
|
Uh oh!
There was an error while loading. Please reload this page.
Environment
e922089b7d7502aff4249d5da3420f6fa55fc6adContext
We are designing a restricted PostgreSQL migration workflow with three separate roles:
INHERIT FALSEandSET TRUEon the migrator's membership.We need Prisma migrations to authenticate as the migrator while executing authorized DDL under the effective owner identity.
Questions
prisma migrate deployandprisma migrate diff, including reconnects?We inspected the locally installed CLI and confirmed that the datasource URL is passed to a separate schema engine. Although node-postgres supports startup options, we cannot establish that the native Prisma migration engine behaves equivalently.
Current safety status: Migration execution is disabled. We are seeking confirmation before implementing or enabling this mechanism.
Any documentation or connector-source references would be appreciated.
All reactions