hotfix: reset model_config sequence before seeding in migration 063#883
hotfix: reset model_config sequence before seeding in migration 063#883vprashrex wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughMigration 063 is fixed to prevent duplicate key violations by adding a sequence synchronization step. After creating model-config indexes, the migration resets the ChangesMigration 063: Sequence Synchronization
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Target issue is #884
Summary
Explain the motivation for making this change. What existing problem does the pull request solve?
Fixes #884. Migration 063 failed on staging because the model_config id sequence was behind the actual max id in the DB. Auto-generated ids during the INSERT collided with existing rows, causing UniqueViolation on model_config_pkey. Fix resets the sequence to max(id) before seeding so new rows get non-conflicting ids.
Checklist
Before submitting a pull request, please ensure that you mark these task.
fastapi run --reload app/main.pyordocker compose upin the repository root and test.Summary by CodeRabbit