fix(db): resolve conflicting drizzle migration entries#1482
Conversation
Two PRs both generated migration 0018, causing a conflict in production. Consolidates both into a single clean 0018_sandbox_and_slack_users migration and removes the orphan 0015_slack_integration.sql file.
📝 WalkthroughWalkthroughThe pull request consolidates database migrations for Slack integration. It removes an enum addition (0015), reorganizes migrations to merge 0018 and 0019 into a single migration that creates a users__slack_users table with Slack-to-user mappings and cascading foreign keys, and updates migration metadata snapshots and journal history accordingly. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
No actionable comments were generated in the recent review. 🎉 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 |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
|
Production DB patched — retrigger CI by pushing an empty commit or closing/reopening the PR. |
Summary
0018, causing a conflict in production (0018_sandbox_startand0018_add_users_slack_users)0018_sandbox_and_slack_users.sqlmigration0015_slack_integration.sqlnot referenced by the journalWhat's left
After merge, production's
__drizzle_migrationstable needs to be patched to replace the two bad records with a single entry matching the new combined migration. Will handle in a follow-up.Test plan
bun drizzle-kit generatewith no schema changes produces no new migrationSummary by CodeRabbit