forked from jsnbuchanan/crowd-funder-for-time-pwa
feat: copy important old settings from master record to others
This commit is contained in:
@@ -68,6 +68,16 @@ const MIG_004_SQL = `
|
||||
WHERE id = 1
|
||||
AND EXISTS (SELECT 1 FROM settings WHERE id = 1 AND activeDid IS NOT NULL AND activeDid != '');
|
||||
|
||||
-- Copy important settings that were set in the MASTER_SETTINGS_KEY to all the other identities.
|
||||
-- (We're not doing them all because some were already identity-specific and others aren't as critical.)
|
||||
UPDATE settings
|
||||
SET firstName = (SELECT firstName FROM settings WHERE id = 1),
|
||||
lastViewedClaimId = (SELECT lastViewedClaimId FROM settings WHERE id = 1),
|
||||
profileImageUrl = (SELECT profileImageUrl FROM settings WHERE id = 1),
|
||||
showShortcutBvc = (SELECT showShortcutBvc FROM settings WHERE id = 1),
|
||||
warnIfProdServer = (SELECT warnIfProdServer FROM settings WHERE id = 1),
|
||||
warnIfTestServer = (SELECT warnIfTestServer FROM settings WHERE id = 1);
|
||||
|
||||
-- CLEANUP: Remove orphaned settings records and clear legacy activeDid values
|
||||
-- This completes the migration from settings-based to table-based active identity
|
||||
-- Use guarded operations to prevent accidental data loss
|
||||
|
||||
Reference in New Issue
Block a user