feat(06-01): migrate categories from emoji to Lucide icon field

- Rename emoji column to icon in schema, Zod schemas, and all services
- Add Drizzle migration with emoji-to-icon data conversion
- Update test helper, seed, and all test files for icon field
- All 87 tests pass with new icon-based schema

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-15 17:48:23 +01:00
parent 78e38df27a
commit 546dff151b
18 changed files with 540 additions and 36 deletions

View File

@@ -0,0 +1,17 @@
ALTER TABLE `categories` RENAME COLUMN `emoji` TO `icon`;--> statement-breakpoint
UPDATE `categories` SET `icon` = CASE
WHEN `icon` = '📦' THEN 'package'
WHEN `icon` = '🏕️' THEN 'tent'
WHEN `icon` = '' THEN 'tent'
WHEN `icon` = '🚲' THEN 'bike'
WHEN `icon` = '📷' THEN 'camera'
WHEN `icon` = '🎒' THEN 'backpack'
WHEN `icon` = '👕' THEN 'shirt'
WHEN `icon` = '🔧' THEN 'wrench'
WHEN `icon` = '🍳' THEN 'cooking-pot'
WHEN `icon` = '🎮' THEN 'gamepad-2'
WHEN `icon` = '💻' THEN 'laptop'
WHEN `icon` = '🏔️' THEN 'mountain-snow'
WHEN `icon` = '⛰️' THEN 'mountain'
ELSE 'package'
END;