Browse Source
- Add migration 003 with data migration logic to prevent data loss - Create dedicated ActiveIdentity interface in separate file for better architecture - Implement $getActiveIdentity method in PlatformServiceMixin - Enhance $updateActiveDid with dual-write pattern for backward compatibility - Maintain separation of concerns between settings and active identity types - Follow project architectural pattern with dedicated type definition files The migration creates active_identity table alongside existing settings, automatically copying existing activeDid data to prevent user data loss. Dual-write pattern ensures backward compatibility during transition. Migration includes: - Schema creation with proper constraints and indexes - Automatic data transfer from settings.activeDid to active_identity.activeDid - Validation to ensure data exists before migration - Atomic operation: schema and data migration happen togetherpull/188/head
4 changed files with 81 additions and 2 deletions
@ -0,0 +1,14 @@ |
|||||
|
/** |
||||
|
* ActiveIdentity type describes the active identity selection. |
||||
|
* This replaces the activeDid field in the settings table for better |
||||
|
* database architecture and data integrity. |
||||
|
* |
||||
|
* @author Matthew Raymer |
||||
|
* @since 2025-08-29 |
||||
|
*/ |
||||
|
|
||||
|
export interface ActiveIdentity { |
||||
|
id: number; |
||||
|
activeDid: string; |
||||
|
lastUpdated: string; |
||||
|
} |
Loading…
Reference in new issue