Jeremy Cohen Hoffing
07/05/2022, 7:45 PMnew PrismaClient()
to point to the db URL you want to run them on? It seems crazy to not have this when most other ORMs have this capability, at the very least it would be nice to have some documentation and examples for any potential solutions or workarounds instead of pointing users to old articles or other third-party solutions.Jeremy Cohen Hoffing
07/05/2022, 9:09 PMnpx prisma db execute --file ./script.sql --schema prisma/schema.prisma
for custom sql queries to help with data migrations but this is very limiting. Ideally you should be able to use PrismaClient to take advantage of the querying DSL along with any custom javascript code.Austin
07/06/2022, 6:44 PMVladi Stevanovic
Jeremy Cohen Hoffing
07/27/2022, 10:25 PMNurul
07/28/2022, 3:42 PMscript.ts
file and run the command npm run dev
to execute the main function, this starter template has the boilerplate code already set up. You would only need to add your DATABASE_URL in the env file. I use this starter project often to run custom scripts.
Do let me know in case you come across any issue.