From ff98d7e64ffcb9a31feffcc44e555ecdd6663442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20F=C3=B6rtsch?= Date: Tue, 3 Mar 2026 14:09:32 +0100 Subject: [PATCH] fix canonical_id reset: stop wiping enrichment data on re-sync Co-Authored-By: Claude Opus 4.6 --- src/shared/db/hooks.ts | 4 ++-- src/shared/stores/sync-store.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shared/db/hooks.ts b/src/shared/db/hooks.ts index 969e864..9639e05 100644 --- a/src/shared/db/hooks.ts +++ b/src/shared/db/hooks.ts @@ -123,14 +123,14 @@ export function useSaveConfig() { export function useSaveGamesBySource() { return useCallback( - async (source: string, games: Omit[]) => { + async (_source: string, games: Omit[]) => { const db = await getDb() for (const game of games) { await db.query( `INSERT INTO games (id, title, source, source_id, platform, last_played, playtime_hours, url, canonical_id, updated_at) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, NOW()) ON CONFLICT (id) DO UPDATE SET - title = $2, last_played = $6, playtime_hours = $7, url = $8, canonical_id = $9, updated_at = NOW()`, + title = $2, last_played = $6, playtime_hours = $7, url = $8, updated_at = NOW()`, [ game.id, game.title, diff --git a/src/shared/stores/sync-store.ts b/src/shared/stores/sync-store.ts index 5153abf..c2ee418 100644 --- a/src/shared/stores/sync-store.ts +++ b/src/shared/stores/sync-store.ts @@ -131,7 +131,7 @@ async function saveGamesBySource( `INSERT INTO games (id, title, source, source_id, platform, last_played, playtime_hours, url, canonical_id, updated_at) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, NOW()) ON CONFLICT (id) DO UPDATE SET - title = $2, last_played = $6, playtime_hours = $7, url = $8, canonical_id = $9, updated_at = NOW()`, + title = $2, last_played = $6, playtime_hours = $7, url = $8, updated_at = NOW()`, [ game.id, game.title,