From 9f0d68d4c90e52e4b6b35c3e241f35226969c109 Mon Sep 17 00:00:00 2001 From: Kelly Date: Sat, 13 Dec 2025 02:33:30 -0700 Subject: [PATCH] Revert "feat: Store full Dutchie payload in latest_raw_payload" This reverts commit e11400566ed27366f603da3afe0f3039abe925bf. --- backend/src/hydration/canonical-upsert.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/src/hydration/canonical-upsert.ts b/backend/src/hydration/canonical-upsert.ts index 4901888d..160bd6f5 100644 --- a/backend/src/hydration/canonical-upsert.ts +++ b/backend/src/hydration/canonical-upsert.ts @@ -92,7 +92,7 @@ export async function upsertStoreProducts( is_on_special, discount_percent, is_in_stock, stock_status, stock_quantity, total_quantity_available, thc_percent, cbd_percent, - image_url, latest_raw_payload, + image_url, first_seen_at, last_seen_at, updated_at ) VALUES ( $1, $2, $3, $4, @@ -101,7 +101,7 @@ export async function upsertStoreProducts( $13, $14, $15, $16, $17, $17, $18, $19, - $20, $21, + $20, NOW(), NOW(), NOW() ) ON CONFLICT (dispensary_id, provider, provider_product_id) @@ -123,7 +123,6 @@ export async function upsertStoreProducts( thc_percent = EXCLUDED.thc_percent, cbd_percent = EXCLUDED.cbd_percent, image_url = EXCLUDED.image_url, - latest_raw_payload = EXCLUDED.latest_raw_payload, last_seen_at = NOW(), updated_at = NOW() RETURNING id, (xmax = 0) as is_new, (local_image_path IS NOT NULL) as has_local_image`, @@ -149,7 +148,6 @@ export async function upsertStoreProducts( product.thcPercent !== null && product.thcPercent <= 100 ? product.thcPercent : null, product.cbdPercent !== null && product.cbdPercent <= 100 ? product.cbdPercent : null, product.primaryImageUrl, - JSON.stringify(product.rawProduct), // Full Dutchie payload ] );