forked from trent_larson/crowd-funder-for-time-pwa
fix(activeDid): implement dual-write pattern with proper MASTER_SETTINGS_KEY usage
- Fix $updateActiveDid() to use MASTER_SETTINGS_KEY constant instead of hardcoded "1" - Update migration plan to reflect current state after rollback - Ensure backward compatibility during activeDid migration transition The dual-write pattern now correctly updates both active_identity and settings tables using the proper MASTER_SETTINGS_KEY constant for settings table targeting.
This commit is contained in:
@@ -219,8 +219,9 @@ export const PlatformServiceMixin = {
|
||||
"UPDATE active_identity SET activeDid = ?, lastUpdated = datetime('now') WHERE id = 1",
|
||||
[newDid || ""],
|
||||
);
|
||||
await this.$dbExec("UPDATE settings SET activeDid = ? WHERE id = 1", [
|
||||
await this.$dbExec("UPDATE settings SET activeDid = ? WHERE id = ?", [
|
||||
newDid || "",
|
||||
MASTER_SETTINGS_KEY,
|
||||
]);
|
||||
logger.debug(
|
||||
`[PlatformServiceMixin] ActiveDid dual-write completed for ${newDid}`,
|
||||
|
||||
Reference in New Issue
Block a user