fix: Schema compatibility - emoji → icon column rename
Production Outline DB uses 'icon' column instead of 'emoji' for documents and revisions. Fixed all affected queries: - documents.ts: SELECT queries - advanced-search.ts: Search queries - analytics.ts: Analytics + GROUP BY - export-import.ts: Export/import metadata - templates.ts: Template queries + INSERT - collections.ts: Collection document listing - revisions.ts: Revision comparison reactions.emoji kept unchanged (correct schema) Tested: 448 documents successfully queried from hub.descomplicar.pt Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -583,7 +583,7 @@ export const collectionsTools: BaseTool<any>[] = [
|
||||
d.id,
|
||||
d."urlId",
|
||||
d.title,
|
||||
d.emoji,
|
||||
d.icon,
|
||||
d."collectionId",
|
||||
d."parentDocumentId",
|
||||
d.template,
|
||||
@@ -1148,7 +1148,7 @@ export const collectionsTools: BaseTool<any>[] = [
|
||||
SELECT
|
||||
d.id,
|
||||
d.title,
|
||||
d.emoji,
|
||||
d.icon,
|
||||
d.text,
|
||||
d."createdAt",
|
||||
d."updatedAt",
|
||||
@@ -1171,7 +1171,7 @@ export const collectionsTools: BaseTool<any>[] = [
|
||||
const exports = documentsResult.rows.map(doc => {
|
||||
const markdown = `---
|
||||
title: ${doc.title}
|
||||
emoji: ${doc.emoji || ''}
|
||||
icon: ${doc.icon || ''}
|
||||
author: ${doc.authorName}
|
||||
created: ${doc.createdAt}
|
||||
updated: ${doc.updatedAt}
|
||||
@@ -1260,7 +1260,7 @@ ${doc.text || ''}
|
||||
SELECT
|
||||
d.id,
|
||||
d.title,
|
||||
d.emoji,
|
||||
d.icon,
|
||||
d.text,
|
||||
d."createdAt",
|
||||
d."updatedAt",
|
||||
@@ -1282,7 +1282,7 @@ ${doc.text || ''}
|
||||
const documents = documentsResult.rows.map(doc => {
|
||||
const markdown = `---
|
||||
title: ${doc.title}
|
||||
emoji: ${doc.emoji || ''}
|
||||
icon: ${doc.icon || ''}
|
||||
author: ${doc.authorName}
|
||||
created: ${doc.createdAt}
|
||||
updated: ${doc.updatedAt}
|
||||
|
||||
Reference in New Issue
Block a user