Rado
PPrisma
•Created by Rado on 11/26/2024 in #help-and-questions
How to run migrations with SET ROLE xxx
Hi everyone,
I’m working on a project where I need to run Prisma migrations, but the database connection requires a specific role to be set before executing any SQL commands. For example, I need to run:
SET ROLE some_table
before any migration is applied. This role is required for permissions to create tables, indexes, etc., in the specific schema.
Is there a clean and automated way to ensure SET ROLE is applied when running Prisma migrations?
Thanks in advance for your help! 😊 prisma with PostgreSQL
7 replies