Thank you for sharing so much detail, Agustin!
Since this is a integration issue, I recommend:
- Support - Neon Docs Neon Support directly - they maintain the integration and can fix the role selection logic
- As a workaround, you can manually set the correct
DATABASE_URLin your Vercel environment variables using a role that has login permissions - You can find the correct connection string with the owner role in your Neon dashboard
When contacting Neon, mention that the Vercel integration is selecting NOLOGIN roles for preview deployments, causing Prisma migrations to fail. They’ll need to update their integration to properly filter database roles.