It's been a very long time since the question is asked but for people having the same problem:
1- In your vercel dashboard's project settings, open environment variables page. Then create the variable DATABASE_URL and assign to your database url.
2- On your local project run "vercel env pull". This will create a .env.local file in the root of your project containing your vercel deployments important values. Next.js is capable of loading multiple env files so you don't need to worry while running the project.
3- But I think node.js commands only load the .env file so when migrating you can use the following commands:
scripts: {
"prismaMigrateLocal": "dotenv -e .env.local -- npx prisma migrate dev",
"prismaMigrateLocalNoSeed": "dotenv -e .env.local -- npx prisma migrate dev --skip-seed"
}