Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename indexed dbs with positron prefix #5035

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/vs/workbench/browser/web.main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,11 +459,15 @@ export class BrowserMain extends Disposable {

// IndexedDB is used for logging and user data
let indexedDB: IndexedDB | undefined;
const userDataStore = 'vscode-userdata-store';
const logsStore = 'vscode-logs-store';
const handlesStore = 'vscode-filehandles-store';
// --- Start Positron ---
const userDataStore = 'positron-userdata-store';
const logsStore = 'positron-logs-store';
const handlesStore = 'positron-filehandles-store';
// --- End Positron ---
try {
indexedDB = await IndexedDB.create('vscode-web-db', 3, [userDataStore, logsStore, handlesStore]);
// --- Start Positron ---
indexedDB = await IndexedDB.create('positron-web-db', 3, [userDataStore, logsStore, handlesStore]);
// --- End Positron ---

// Close onWillShutdown
this.onWillShutdownDisposables.add(toDisposable(() => indexedDB?.close()));
Expand Down
4 changes: 3 additions & 1 deletion src/vs/workbench/services/storage/browser/storageService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,9 @@ export class IndexedDBStorageDatabase extends Disposable implements IIndexedDBSt
}
}

private static readonly STORAGE_DATABASE_PREFIX = 'vscode-web-state-db-';
// --- Start Positron ---
private static readonly STORAGE_DATABASE_PREFIX = 'positron-web-state-db-';
// --- End Positron ---
private static readonly STORAGE_OBJECT_STORE = 'ItemTable';

private readonly _onDidChangeItemsExternal = this._register(new Emitter<IStorageItemsChangeEvent>());
Expand Down