refactor(identity): rename provider_id to external_account_id and restructure schema#186
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR replaces the legacy 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 Tip You can get early access to new features in CodeRabbit.Enable the |
Summary
This PR refactors the external identity schema by renaming
provider_idtoexternal_account_idand consolidating OAuth credentials directly into theExternalIdentitymodel.Changes
Database Schema
providerstable toexternal_identitiesprovider_idcolumn toexternal_account_idacross all modulesprovider_tokenstable (now consolidated intocredentialsJSON column)AccessTokenmodel deletion (credentials now stored inline)2026_03_21_000001_migrate_providers_to_external_identities.phpNew Enums
CredentialsType: OAuth2, ApiKey, etc.IdentityType: External, System, Service, etc.New Components
ClientAccessManager: Data class for storing encrypted OAuth credentialsAsCredentials: Cast for automatic encryption/decryption of credentialsUpdated Modules
external_identity_idBreaking Changes
provider_idcolumn renamed toexternal_account_idAccessTokenmodel removed (useExternalIdentity::$credentialsinstead)providerstable renamed toexternal_identitiesMigration Required
Run the migration to update existing data:
Test Status
All tests have been updated and should pass with the new schema.
Summary by CodeRabbit
New Features
Bug Fixes
Database Migrations
Refactor