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:
17
drizzle/0001_rename_emoji_to_icon.sql
Normal file
17
drizzle/0001_rename_emoji_to_icon.sql
Normal 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;
|
||||
Reference in New Issue
Block a user