You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Handle TimescaleDB error message when trying to create shadow database #20266
TimescaleDB seems to return a special error message when migrate dev tries to create a shadow database, which we do not handle yet and hence just dump at the user without special handling.
Try to run the npx prisma migrate dev command on the timescale forge database will result in an error since the command tries to create a table:
Error: Database error
Error querying the database: db error: ERROR: tsdb_admin: database prisma_migrate_shadow_db_ab8fe7fa-8d81-4493-bafe-bf5645e6d2cc is not an allowed database name
HINT: Contact your administrator to configure the "tsdb_admin.allowed_databases"
We could detect this error message and handle it with a link to the "shadow database when you can not CREATE DATABASE" documentation as we do with other cases we detect.
Actually, this is already handled appropriately now:
$ npx prisma migrate dev
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "tsdb", schema "public" at "opj14wxfkv.kn5o1onhbq.tsdb.cloud.timescale.com:30943"
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: tsdb_admin: database prisma_migrate_shadow_db_1dc9385e-8a23-4b7d-8f30-1c037906c5ef is not an allowed database name
HINT: Contact your administrator to configure the "tsdb_admin.allowed_databases"
0: schema_core::state::DevDiagnostic
at schema-engine/core/src/state.rs:266
Activity
janpio commentedon Jul 17, 2023
Actually, this is already handled appropriately now: