Revert "feat: Store full Dutchie payload in latest_raw_payload"

This reverts commit e11400566e.
This commit is contained in:
Kelly
2025-12-13 02:33:30 -07:00
parent e11400566e
commit 9f0d68d4c9

View File

@@ -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
]
);