Prisma seed - add config for custom seed.ts file path
See original GitHub issuePrisma 2.15.0
I have folder structure:
- package.json
- schema.prisma
- seed.ts
When I run prisma db seed --preview-feature
it says Create a seed.ts, .js, .sh or .go file in the prisma directory.
.
But I have prisma as a package with custom build dir so when I want to get prisma seed working I need to create another prisma folder and put seed.ts in it.
It would be greate to specify seed file path like prisma db seed --path ./seed.ts --preview-feature
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Seeding your database - Prisma
Learn how to seed your database using Prisma's integrated seeding ... In the seed.ts file, import Prisma Client, initialize it and create some...
Read more >prisma db seed & typescript problem with import and type ...
Try and double-check your seed command in the prisma section of your package.json, it should look like the one in the repo of...
Read more >How to seed a database with Prisma and Next.js - PlanetScale
In this tutorial, we'll see how to seed a PlanetScale database using Prisma in a Next.js project. Check out the Prisma quickstart for...
Read more >Command Line Interface | RedwoodJS Docs
Create a Redwood project using the yarn create command: ... you can off-load long running tasks; Custom seed scripts for your application during...
Read more >Jokes App Tutorial - Remix
You can programmatically create routes via the remix.config.js , but the more common way to create the ... We do this at the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
How to set custom path for prisma seed file? (not for prisma schema)
@janpio It works out of box, noo need to specify the path. In new prisma version this is fixed with
--schema
flag: