Error: P1003 : Prisma Migrate could not create the shadow database.

Sarwar Hossain - Jul 30 - - Dev Community

Fix your Prisma Migration error:

1. Update your .env config .

DATABASE_URL="postgresql://postgres:asdf4321@127.0.0.1:5432/postgres"
SHADOW_DATABASE_URL="postgresql://postgres:asdf4321@127.0.0.1:5432/postgres"
Enter fullscreen mode Exit fullscreen mode

Image description

2. Update schema.prisma file.

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider          = "postgresql"
  url               = env("DATABASE_URL")
  shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
}
Enter fullscreen mode Exit fullscreen mode

Image description

That's solved now.

3. Now migrate your Database.

 npx prisma migrate dev
Enter fullscreen mode Exit fullscreen mode
. . . . . . . . .
Terabox Video Player