Files
cannaiq/backend/migrations/092_fix_trulieve_urls.sql
Kelly 470097eb19 fix: Intelligence stores endpoint and UI consistency
- Fix stores endpoint to only show stores with actual products (INNER JOIN + HAVING)
- Update badge colors to match Workers/Tasks dashboard style
- Use emerald/amber/red/gray color scheme consistently
- Chain badge now uses purple (bg-purple-100)
- Add migration 092 to fix Trulieve store URLs

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 23:37:28 -07:00

31 lines
1.0 KiB
SQL

-- Fix 3 Trulieve/Harvest stores with incorrect menu URLs
-- These records have NULL or mismatched platform_dispensary_id so store_discovery
-- ON CONFLICT can't update them automatically
UPDATE dispensaries
SET
menu_url = 'https://dutchie.com/dispensary/svaccha-llc-nirvana-center-apache-junction',
updated_at = NOW()
WHERE id = 224;
UPDATE dispensaries
SET
menu_url = 'https://dutchie.com/dispensary/trulieve-of-phoenix-tatum',
updated_at = NOW()
WHERE id = 76;
UPDATE dispensaries
SET
menu_url = 'https://dutchie.com/dispensary/harvest-of-havasu',
updated_at = NOW()
WHERE id = 403;
-- Queue entry_point_discovery tasks to resolve their platform_dispensary_id
-- method='http' ensures only workers that passed http preflight can claim these
INSERT INTO worker_tasks (role, dispensary_id, priority, scheduled_for, method)
VALUES
('entry_point_discovery', 224, 5, NOW(), 'http'),
('entry_point_discovery', 76, 5, NOW(), 'http'),
('entry_point_discovery', 403, 5, NOW(), 'http')
ON CONFLICT DO NOTHING;