[_]: fix(migrations): add partial unique indexes for mail accounts, addresses, and provider accounts#85
[_]: fix(migrations): add partial unique indexes for mail accounts, addresses, and provider accounts#85jzunigax2 wants to merge 1 commit into
Conversation
…ses, and provider accounts - Created migration files to implement partial unique indexes on `mail_accounts`, `mail_addresses`, and `mail_provider_accounts` tables. - Updated the `AccountService` to handle unique constraint violations more effectively, ensuring proper conflict handling during account provisioning. - Enhanced model definitions to include the new unique indexes, allowing for better management of soft-deleted records.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughMigrations and Sequelize models replace unconditional unique constraints on mail_accounts.user_id, mail_addresses.address, and mail_provider_accounts (mail_address_id, provider+external_id) with partial unique indexes scoped to non-deleted rows. provisionAccount's unique-constraint conflict handling is updated with a new test. ChangesPartial Unique Constraints Migration
Estimated code review effort: 3 (Moderate) | ~25 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |


mail_accounts,mail_addresses, andmail_provider_accountstables.AccountServiceto handle unique constraint violations more effectively, ensuring proper conflict handling during account provisioning.Summary by CodeRabbit
New Features
Bug Fixes
Tests