PrismaP
Prismaโ€ข2mo agoโ€ข
4 replies
Matute

Question about _prisma_migrations table location in multi-schema setup

Hey everyone! ๐Ÿ‘‹
I'm working with PostgreSQL multi-schema configuration and have a question about where the _prisma_migrations table gets created.

My setup: prismadatasource db { provider = "postgresql" url = env("DATABASE_URL") // ?schema=public schemas = ["my_app_schema"] }

model User { id Int @id @@schema("my_app_schema") }

The issue:

My application tables are created in my_app_schema
But _prisma_migrations is created in public (from the connection string)

My question:
Is there a way to configure Prisma to create _prisma_migrations in a specific schema (like my_app_schema) without changing the connection string's schema parameter?
I'd prefer to keep everything in my_app_schema and avoid using the public schema entirely.
If this isn't currently possible, would it make sense to open a feature request for this?
Thanks!
Was this page helpful?