fix(menu-detection): remove non-existent platform_dispensary_id_resolved_at column

The UPDATE query was trying to set a column that doesn't exist in the database
schema, causing platform ID resolution to fail silently. Now stores the
resolved_at timestamp in provider_detection_data JSONB instead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Kelly
2025-12-03 19:40:22 -07:00
parent 66e07b2009
commit bd65674f3a
4 changed files with 8 additions and 4 deletions

View File

@@ -1154,8 +1154,6 @@ router.get('/monitor/active-jobs', async (_req, res) => {
jrl.items_succeeded,
jrl.items_failed,
jrl.metadata,
jrl.worker_id,
jrl.worker_hostname,
js.description as job_description,
EXTRACT(EPOCH FROM (NOW() - jrl.started_at)) as duration_seconds
FROM job_run_logs jrl

View File

@@ -587,7 +587,6 @@ async function detectAndResolveDispensary(dispensaryId) {
UPDATE dispensaries SET
menu_type = 'dutchie',
platform_dispensary_id = $1,
platform_dispensary_id_resolved_at = NOW(),
provider_detection_data = COALESCE(provider_detection_data, '{}'::jsonb) ||
jsonb_build_object(
'detected_provider', 'dutchie'::text,
@@ -595,6 +594,7 @@ async function detectAndResolveDispensary(dispensaryId) {
'detected_at', NOW(),
'cname_extracted', $2::text,
'platform_id_resolved', true,
'platform_id_resolved_at', NOW(),
'resolution_error', NULL::text,
'not_crawlable', false
),