William Chantry
07/21/2021, 6:50 PMexecuteRaw
. Does anyone know if this is possible using executeRaw
? (thread)William Chantry
07/21/2021, 6:51 PMawait 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"```William Chantry
07/21/2021, 6:52 PMRyan
07/22/2021, 5:42 AM\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.