Title
k

Kiran

03/01/2022, 3:30 PM
Error: P3014

Prisma Migrate could not create the shadow database. Please make sure the database user has permission to create databases. Read more about the shadow database (and workarounds) at <https://pris.ly/d/migrate-shadow>

Original error: 
db error: ERROR: permission denied to create database
   0: sql_migration_connector::flavour::postgres::sql_schema_from_migration_history
             at migration-engine/connectors/sql-migration-connector/src/flavour/postgres.rs:363
   1: migration_core::state::DevDiagnostic
             at migration-engine/core/src/state.rs:178
How can I solve this bug? Any hint is much appreciated
n

Nurul

03/01/2022, 4:51 PM
Hey @Kiran 👋 You would need to create shadow databases manually in case you want to use migrate with cloud hosted database provider like heroku, digital ocean. You would need to pass in the shadow database connection url in the
datasource
block as shadowDatabaseUrl parameter. However if you just want to quickly prototype and sync your schema to database without using migrate, you could achieve it through
npx prisma db push
command. Here is a reference for using db push command.
k

Kiran

03/05/2022, 1:23 PM
Thank you very much @Nurul for your support
👍 1