I’m trying to create a db and add an extension (th...
# orm-help
w
I’m trying to create a db and add an extension (this is a test helping database, integresql) but am having trouble connecting and inspecting said db using
executeRaw
. Does anyone know if this is possible using
executeRaw
? (thread)
Copy code
await prismaClient.$executeRaw(`\d`);
  await prismaClient.$executeRaw('CREATE DATABASE integresql_template_test_db;');
  await prismaClient.$executeRaw(`\d`);
  await prismaClient.$executeRaw(`\dn`);
  await prismaClient.$executeRaw(`\c integresql_template_test_db`)
escaping the backlash leads to a syntax error, this lleads to: ``Invalid
prisma.executeRaw()
invocation:` `60 Raw query failed. Code:
42601
. Message: `db error: ERROR: syntax error at or near "d"```
clientVersion: ‘2.22.1’,
r
\d
is
psql
specific if I’m not wrong. If you want to add an extension, the best way to do that would be directly via Migrate where Prisma automatically connects to the database and adds it.