Tenant-safe migrations
Customer roles keep NOCREATEDB. Each Prisma shadow uses an isolated database and role.
PostgreSQL inventory and isolated developer-tooling databases.
Customer roles keep NOCREATEDB. Each Prisma shadow uses an isolated database and role.
Choose 24, 72, or 168 hours. The worker revokes credentials and deletes expired resources.
Use the shadow URL only with migrate dev. Production runs prisma migrate deploy.
prisma migrate devConnect an active database to Prisma in one guided workflow.
Place the generated URL in a secret named SHADOW_DATABASE_URL. Never point it at the production database.
// prisma.config.ts
export default defineConfig({
datasource: {
url: env("DATABASE_URL"),
shadowDatabaseUrl: env("SHADOW_DATABASE_URL"),
},
});