fix(electron): clone db file when enable cloud for desktop (#5028)

At the moment on desktop the user's local blob data will be lost after enable cloud.
This is because blob data is only synced from old idb to new idb, but not sync into sqlitedb.

This pr will simply clone the db file for desktop app. It should also speed up the time when enabling cloud for a large local workspace.
This commit is contained in:
Peng Xiao
2023-11-23 07:23:16 +00:00
parent 9ded6afb4b
commit 7463e87742
4 changed files with 65 additions and 22 deletions

View File

@@ -200,6 +200,7 @@ export type WorkspaceHandlers = {
list: () => Promise<[workspaceId: string, meta: WorkspaceMeta][]>;
delete: (id: string) => Promise<void>;
getMeta: (id: string) => Promise<WorkspaceMeta>;
clone: (id: string, newId: string) => Promise<void>;
};
export type UnwrapManagerHandlerToServerSide<