Join our community: https://t.me/+DOylgFv1jyJlNzM0
Why this matters
backend/prisma/seed.ts presumably inserts demo users/streams for local development. If it uses create() rather than upsert(), running npx prisma db seed a second time against an already-seeded database will either duplicate rows (if IDs aren't unique-constrained) or crash with a constraint violation, making the seed script unsafe to re-run, which is a common local-dev workflow.
Acceptance criteria
Files to touch
backend/prisma/seed.ts
backend/README.md
Out of scope
- Changing the seed data content
- Adding a
db reset wrapper script
Why this matters
backend/prisma/seed.tspresumably inserts demo users/streams for local development. If it usescreate()rather thanupsert(), runningnpx prisma db seeda second time against an already-seeded database will either duplicate rows (if IDs aren't unique-constrained) or crash with a constraint violation, making the seed script unsafe to re-run, which is a common local-dev workflow.Acceptance criteria
seed.tsforcreate()calls that should beupsert()backend/README.mdFiles to touch
backend/prisma/seed.tsbackend/README.mdOut of scope
db resetwrapper script