Skip to content

Conversation

@sanny-io
Copy link
Contributor

@sanny-io sanny-io commented Oct 17, 2025

An errant prisma folder containing the Prisma client was being generated when running zen migrate reset.

This PR fixes that.

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Updated the reset command to skip generation by default while preserving existing force flag behavior.

@coderabbitai
Copy link

coderabbitai bot commented Oct 17, 2025

Walkthrough

The runReset function in the migrate action has been modified to unconditionally add the --skip-generate flag to the command construction, while preserving the existing optional --force flag behavior in a single command string.

Changes

Cohort / File(s) Summary
CLI migrate action update
packages/cli/src/actions/migrate.ts
Modified runReset to unconditionally append --skip-generate flag to command construction while maintaining --force flag behavior

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

This is a straightforward, localized change affecting a single function with a minor command flag addition. No complex logic or structural modifications are involved.

Suggested reviewers

  • ymc9

Poem

🐰 A flag hops into the reset's flow,
--skip-generate steals the show,
No more delays, the code runs quick,
Our little change does the trick! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "fix: skip generators for migrate reset" directly and accurately reflects the main change in the changeset. The raw summary confirms that the runReset function now adds --skip-generate unconditionally, which aligns precisely with the stated objective of preventing the unintended prisma folder generation during zen migrate reset. The title is concise, specific, and clearly communicates the primary modification without vagueness or misleading language. It appropriately uses the "fix:" prefix to denote a bug fix and targets the exact command being modified.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2298fc9 and 5a73c98.

📒 Files selected for processing (1)
  • packages/cli/src/actions/migrate.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
{packages,samples,tests}/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place packages only under packages/, samples/, or tests/

Files:

  • packages/cli/src/actions/migrate.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-test (20.x, postgresql)
  • GitHub Check: build-test (20.x, sqlite)
🔇 Additional comments (1)
packages/cli/src/actions/migrate.ts (1)

85-90: The change is correct and well-implemented.

The addition of --skip-generate to prisma migrate reset at line 88 is a valid and supported flag. The implementation is consistent with the runDev function (line 72), which also uses this flag. Other migrate commands (deploy, status, resolve) correctly omit this flag because Prisma does not support --skip-generate for those commands—only migrate dev and migrate reset support it.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Member

@ymc9 ymc9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good fix! Thank you @sanny-io

@ymc9 ymc9 merged commit 6f48c74 into zenstackhq:dev Oct 17, 2025
5 of 6 checks passed
@sanny-io sanny-io deleted the fix/skip-generators-for-migrate-reset branch October 17, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants