There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix(server): avoid workspace subdoc guid conflict (#4664)
liuyi7275d417b2c9
diff --git a/packages/backend/server/src/modules/doc/manager.ts b/packages/backend/server/src/modules/doc/manager.tsindex 93be879a88..0dec55d1da 100644--- a/packages/backend/server/src/modules/doc/manager.ts+++ b/packages/backend/server/src/modules/doc/manager.ts@@ -434,6 +434,10 @@ export class DocManagerlet lastTurnCount = 100;while (lastTurnCount === 100) {const docs = await this.db.snapshot.findMany({+ select: {+ workspaceId: true,+ id: true,+ },skip: turn * 100,take: 100,orderBy: {@@ -446,6 +450,12 @@ export class DocManagerconst docId = new DocID(doc.id, doc.workspaceId);if (docId && !docId.isWorkspace && docId.guid !== doc.id) {+ await this.db.snapshot.deleteMany({+ where: {+ id: docId.guid,+ workspaceId: doc.workspaceId,+ },+ });await this.db.snapshot.update({where: {id_workspaceId: {