-
-
Notifications
You must be signed in to change notification settings - Fork 971
fix(migrations): Add IF NOT EXISTS to 20260116154810_add_idempotency_key_options_to_task_run #2923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…key_options_to_task_run
|
WalkthroughThis pull request contains two changes: a modification to a Prisma database migration that changes the ADD COLUMN syntax to ADD COLUMN IF NOT EXISTS for an idempotencyKeyOptions JSONB column on the TaskRun table, and a new bash script that implements a batch concurrency cleaner for Redis-backed batch processing. The script accepts Redis URLs and optional flags, uses Lua scripting to atomically identify stale concurrency entries across Redis shards, and provides both reporting and cleanup capabilities with a dry-run mode. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (1)internal-packages/database/prisma/migrations/**/*.sql📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (3)📓 Common learnings📚 Learning: 2026-01-15T11:50:06.067ZApplied to files:
📚 Learning: 2026-01-15T11:50:06.067ZApplied to files:
⏰ 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). (21)
🔇 Additional comments (1)
✏️ Tip: You can disable this entire section by setting 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 |
Review CompleteYour review story is ready! Comment !reviewfast on this PR to re-generate the story. |
Summary
IF NOT EXISTSto the migration that addsidempotencyKeyOptionscolumn to prevent errors if the column already existsMigration Checksum Fix
If you've already applied the previous version of this migration, you'll need to update the checksum in your
_prisma_migrationstable to match the new migration file.Previous checksum:
f8876e274e3f7735312275eb24a9c4b40f512ac12a286b2de3add47f66df5b27New checksum:
0620a914ddbaf01279576274432e51c41f41502cd4c8de38621625380750e397Fix instructions
Run this SQL command against your database:
This updates the stored checksum to match the modified migration file, allowing future migrations to proceed without checksum mismatch errors.
Test plan
🤖 Generated with Claude Code