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>
This commit is contained in:
30
backend/migrations/092_fix_trulieve_urls.sql
Normal file
30
backend/migrations/092_fix_trulieve_urls.sql
Normal file
@@ -0,0 +1,30 @@
|
||||
-- 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;
|
||||
Reference in New Issue
Block a user