MCPcopy Create free account
hub / github.com/bytebase/bytebase / migrateStorageKeys

Function migrateStorageKeys

frontend/src/utils/storage-migrate.ts:177–188  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

175 * Must be called before any store or composable reads from localStorage.
176 */
177export function migrateStorageKeys() {
178 if (localStorage.getItem(MIGRATION_MARKER)) return;
179
180 migrateLanguage();
181 migrateStaticKeys();
182 migratePrefixKeys();
183 migrateUIScopeKeys();
184 migrateSqlEditorTabKeys();
185 migrateSqlEditorConnKeys();
186
187 localStorage.setItem(MIGRATION_MARKER, "1");
188}
189
190/**
191 * Migrate user-scoped localStorage keys when email changes.

Callers 2

main.tsFile · 0.90

Calls 6

migrateLanguageFunction · 0.85
migrateStaticKeysFunction · 0.85
migratePrefixKeysFunction · 0.85
migrateUIScopeKeysFunction · 0.85
migrateSqlEditorTabKeysFunction · 0.85
migrateSqlEditorConnKeysFunction · 0.85

Tested by

no test coverage detected