P
Prisma5mo ago
Spleen

How do I go about seeding with the D1 adapter?

Hey all, I have recently started using the D1 adapter and I am a bit confused around how seeding should be handled. Initially I thought it would be the same as other DB's so I was following the guide here: https://www.prisma.io/docs/orm/prisma-migrate/workflows/seeding#seeding-your-database-with-typescript-or-javascript. The issue is when using the D1 adapter it requires a binding to the D1 database instance which comes from the Cloudflare workers context. Since the seed script would run outside of the workers context, is there anyway to provide an access token or something similar to connect to the D1 database instead? My current solution is a simple worker that handles the seeding, but this has its own issues as there is a limit to the amount of sub-requests (50/request).
Seeding | Prisma Documentation
Learn how to seed your database using Prisma ORM's integrated seeding functionality and Prisma Client
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server