diff --git a/src/db-sql/migration.ts b/src/db-sql/migration.ts index 14dc36d4..81b3d913 100644 --- a/src/db-sql/migration.ts +++ b/src/db-sql/migration.ts @@ -79,8 +79,8 @@ const MIG_004_SQL = ` warnIfTestServer = (SELECT warnIfTestServer FROM settings WHERE id = 1); -- CLEANUP: Remove orphaned settings records and clear legacy activeDid values + -- which usually simply clears out the MASTER_SETTINGS_KEY record. -- This completes the migration from settings-based to table-based active identity - -- Use guarded operations to prevent accidental data loss DELETE FROM settings WHERE accountDid IS NULL; UPDATE settings SET activeDid = NULL; `; diff --git a/src/views/IdentitySwitcherView.vue b/src/views/IdentitySwitcherView.vue index 0e5516e6..8a369ac6 100644 --- a/src/views/IdentitySwitcherView.vue +++ b/src/views/IdentitySwitcherView.vue @@ -306,6 +306,7 @@ export default class IdentitySwitcherView extends Vue { } await this.$exec("DELETE FROM accounts WHERE id = ?", [id]); + await this.$exec("DELETE FROM settings WHERE accountDid = ?", [accountDid]); }); // Update UI