Kevin Marrec
11/14/2018, 11:14 AMprisma seed
use a seed.ts
which use generated prisma client. In the case you don't have generated files yet, you're just not being able to perform the first deploy.
Everything works with repo as generated
folder is already here when pulling. But IMO generated
folder must be git ignored.schickling
11/14/2018, 12:54 PMrun
seed option should be always relative to the prisma.yml
file but currently is relative to your cwd of your CLI. Would you mind opening a GH issue for this? 🙏Kevin Marrec
11/14/2018, 2:47 PMseed.ts
depends on generated resources. And generation is done AFTER deploy, so AFTER seeding. So even if you keep your generated
folder, seeding will always use a version generated with the old schema 😁Kevin Marrec
11/14/2018, 2:51 PMgenerated
folder, then prisma deploy
2) Pull the example, change datamodel.prisma
to have a new Model, change seed.ts
to add some entries related to this Model, prisma deploy
(in this case you'll even have typescript
errors in your VSCode Editor when updating seed.ts
^^schickling
11/14/2018, 3:08 PMKevin Marrec
11/14/2018, 3:16 PMKevin Marrec
11/14/2018, 3:17 PMKevin Marrec
11/14/2018, 3:22 PMschickling
11/14/2018, 3:41 PM