Files
GearBox/drizzle/0001_rename_emoji_to_icon.sql
Jean-Luc Makiola 546dff151b 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>
2026-03-15 17:48:23 +01:00

18 lines
643 B
SQL

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;