feat: add Prisma seed script for database initialization#83
feat: add Prisma seed script for database initialization#83SainiAdi-04 wants to merge 1 commit intoketankauntia:masterfrom
Conversation
|
@SainiAdi-04 is attempting to deploy a commit to the Ketan's Personal Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning
|
| Cohort / File(s) | Summary |
|---|---|
Version Control \.gitignore |
Adds .vscode/ to excluded paths |
Package Configuration package.json |
Adds db:seed npm script pointing to prisma db seed; adds Prisma seed configuration targeting prisma/seed.ts; introduces tsx (^4.21.0) as both development and direct dependency |
Database Seeding prisma/seed.ts |
New seed script with idempotent upsert operations for example organization (including metadata, images, social links, stats, technologies, topics, and years), linked example project (with codes, HTML, mentor/contributor references), and waitlist entry; includes proper PrismaClient initialization, logging, error handling, and cleanup |
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
🐰 With a hop and a skip, the seeds now take flight,
Database gardens growing from code, oh what a sight!
.vscode tucked away, tsx bundled with care,
Organizations sprouting from Prisma's seed layer,
A warren of data, seeded so fair! 🌱✨
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title accurately and clearly describes the main objective: adding a Prisma seed script for database initialization, which is the primary focus of all changes. |
| Description check | ✅ Passed | The description covers all required template sections with clear summary, testing instructions, and completed checklist items; minor documentation of setup requirements is present. |
| Linked Issues check | ✅ Passed | The pull request successfully implements the objective from issue #77 by providing a configured Prisma seed script that enables npx/pnpm prisma db seed to populate organizations and related data. |
| Out of Scope Changes check | ✅ Passed | All changes are directly scoped to the seed script implementation: .gitignore configuration, package.json seed setup, and the seed script file itself; no unrelated modifications detected. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
- 📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
Summary
This PR adds a Prisma seed script to populate the database with example data for organizations, projects, and waitlist entries. The seed is idempotent and can be safely re-run.
Closes: #77 Prisma seed script
Changes
Setup Notes
During setup, the following were required:
Testing
pnpm install
pnpm prisma generate
pnpm prisma db seed
Checklist
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.