TypedSQL in pipeline?
Hello!
I am currently switching my Express.js app from using the
prisma-client-js
to prisma-client
provider. Which means I generate my prisma files into /src/generated/prisma and then use them. Now I also needed a TypedSQL query so I use npx prisma generate --sql
to create the corresponting file in the "generated" dir (this dir is gitignored as instructed in the docs). Now my pipeline obviously fails, because in it, I dont have an active database connection, which makes me wonder:
- What is the recommended way of handling Prisma in a pipeline with the prisma-client
provider. Am I really expected to make a connection to a database, everytime a commit is pushed to the repo?
Thank you2 Replies
You're in no rush, so we'll let a dev step in. Enjoy your coffee, or drop into
#ask-ai
if you get antsy for a second opinion!Hey!
Unfortunately It's a known limitation at the moment:
https://github.com/prisma/prisma/issues/25124
GitHub
Remove requirement for a running database when using TypedSQL · Is...
Problem When using the new TypedSQL functionality of Prisma ORM, you need to have a running database. This is because the functionality relies on the database to parse the SQL and return type infor...