Relative Content

Tag Archive for javascriptsqlpostgresqlprisma

How can I generate Prisma CUID’s when using sql?

I have a prisma server for my database. I am trying to use the cuid() function outside of the prisma schema.prisma file, but I don’t see any package that imports that function and I don’t know where it comes from. I want change the format of a table and I’m in the process of migrating the data from one format to another by making different tables (one with the original data and one with the newly formatted data). Currently, I use an approach using prisma queries to get the data I need, but I want to try using SQL queries to both fetch and create the new rows in the new format table and test which approach is faster. Currently my prisma approach is quite slow, it will take about a 2.5 months to migrate the data at my current pace.