mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 12:35:25 +02:00
fix: paginate getAllSyncedRows to fetch all products beyond the 1000 row Supabase cap
With 1005+ products, the old query returned only the top 1000 by updated_at. Items edited long ago (like 51016DE) were silently missing from syncedData, so the merge never applied their saved edits. Now paginate by product_id until we exhaust the table. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
be7009353a
commit
e1cfaaedfa
@@ -134,9 +134,6 @@ export default function App() {
|
||||
|
||||
console.log('Fetching synced data from Supabase...');
|
||||
const syncedData = await getAllSyncedRows();
|
||||
// TEMP DIAG
|
||||
const d = syncedData['51016DE'];
|
||||
console.log('[DIAG v2] 51016DE:', d ? `status=${d.status} len=${d.data?.length} [103]=${JSON.stringify(d.data?.[103])}` : 'NOT FOUND');
|
||||
|
||||
// Extend headers with virtual columns if the Excel is shorter than the saved data.
|
||||
// COLUMNS hardcoded indices (PRODUCT_TYPE=103, ITEM_TO_LOGISTIC=104, etc.) are used
|
||||
|
||||
Reference in New Issue
Block a user