Add seed data aligned with latest Prisma schema#34
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a comprehensive Prisma seed script intended to populate a fresh database with baseline reference data and sample operational data aligned to the current multi-file Prisma schema.
Changes:
- Replaced the minimal seed with an expanded
prisma/seed.tsthat seeds core reference tables (countries, cultures, localized strings, roles, partners, locations, administrative levels). - Added seeding for domain data (tree types, projects, users + role assignments + project membership, scan batches, tree scans + audits, adopters + adoptions, reports).
- Added password hashing for seeded users and additional console output during seeding.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I found the issue. The seed was doing too much work inside one large Prisma transaction and on rerun it could exceed Prisma’s default interactive transaction timeout, especially because password compare/hash work was happening during user updates.
Please pull the latest changes and test again with: If the schema is already applied and no migration step is needed locally, then just run: |
Jaykumar677
left a comment
There was a problem hiding this comment.
Good to go for now, as it is not a blocker. However, we will create a separate ticket for the hardcoded part.


This PR introduces seed data aligned with the current Prisma multi-file schema.
Ready for review.
