From d586048b5280a92888bf650a985678ae893cef6c Mon Sep 17 00:00:00 2001 From: Antigravity Date: Sun, 5 Jul 2026 13:34:47 +0000 Subject: [PATCH] fix: organize-notebook orphelin (sed console.log) + migration DB indexes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - organize-notebook.ts: lignes orphelines supprimées (console.log multi-ligne cassé par sed) - Migration 20260629000000: CREATE INDEX contentUpdatedAt DESC + isPublic sur Note - schema.prisma: commentaire SQL brut retiré (invalidait prisma) --- memento-note/app/actions/organize-notebook.ts | 4 ---- .../migrations/20260629000000_add_note_indexes/migration.sql | 3 +++ memento-note/prisma/schema.prisma | 4 ---- 3 files changed, 3 insertions(+), 8 deletions(-) create mode 100644 memento-note/prisma/migrations/20260629000000_add_note_indexes/migration.sql diff --git a/memento-note/app/actions/organize-notebook.ts b/memento-note/app/actions/organize-notebook.ts index 816bc58..6ccd3d5 100644 --- a/memento-note/app/actions/organize-notebook.ts +++ b/memento-note/app/actions/organize-notebook.ts @@ -205,10 +205,6 @@ export async function executeNotebookOrganization(plan: OrganizationPlan): Promi }) if (!notebook) return { success: false, created: 0, moved: 0, error: 'Carnet introuvable' } - notebookId: plan.notebookId, - groups: plan.groups.map(g => ({ name: g.name, isNew: g.isNew, existingId: g.existingId, noteCount: g.notes.length })) - })) - let created = 0 let moved = 0 diff --git a/memento-note/prisma/migrations/20260629000000_add_note_indexes/migration.sql b/memento-note/prisma/migrations/20260629000000_add_note_indexes/migration.sql new file mode 100644 index 0000000..d912ed7 --- /dev/null +++ b/memento-note/prisma/migrations/20260629000000_add_note_indexes/migration.sql @@ -0,0 +1,3 @@ +-- Add indexes for performance +CREATE INDEX IF NOT EXISTS "Note_contentUpdatedAt_idx" ON "Note" ("contentUpdatedAt" DESC); +CREATE INDEX IF NOT EXISTS "Note_isPublic_idx" ON "Note" ("isPublic"); diff --git a/memento-note/prisma/schema.prisma b/memento-note/prisma/schema.prisma index faf363d..866c655 100644 --- a/memento-note/prisma/schema.prisma +++ b/memento-note/prisma/schema.prisma @@ -749,10 +749,6 @@ model DocumentChunk { @@index([attachmentId, chunkIndex]) } --- Index vectoriel pour recherche sémantique sur DocumentChunk (HNSW) --- CREATE INDEX IF NOT EXISTS document_chunk_embedding_hnsw_idx --- ON "DocumentChunk" USING hnsw ("embedding" vector_cosine_ops); - // ===== BYOK (Story 3.5) ===== model UserAPIKey {