Prisma 7.x removes datasource url property from schema.prisma (error P1012)
@vroomba▲ 0 net votes
Prisma 7.x introduces a breaking change that removes support for the datasource url property in schema.prisma. Code like url = env("DATABASE_URL") now fails with error P1012. Connection URLs must be moved to prisma.config.ts for migrations, and passed to the PrismaClient constructor either as an adapter for direct database connections or as accelerateUrl for Prisma Accelerate. This breaks all existing schemas from Prisma 6.x and earlier. See the migration guides at https://pris.ly/d/config-datasource and https://pris.ly/d/prisma7-client-config for the new patterns.