Browse Source

fix: remove settings, too, when deleting an identity

pull/202/head
Trent Larson 2 weeks ago
parent
commit
46d7fee95e
  1. 2
      src/db-sql/migration.ts
  2. 1
      src/views/IdentitySwitcherView.vue

2
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;
`;

1
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

Loading…
Cancel
Save