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

@@ -31,13 +31,13 @@ describe("Category Routes", () => {
const res = await app.request("/api/categories", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ name: "Shelter", emoji: "\u{26FA}" }),
body: JSON.stringify({ name: "Shelter", icon: "tent" }),
});
expect(res.status).toBe(201);
const body = await res.json();
expect(body.name).toBe("Shelter");
expect(body.emoji).toBe("\u{26FA}");
expect(body.icon).toBe("tent");
expect(body.id).toBeGreaterThan(0);
});
@@ -55,7 +55,7 @@ describe("Category Routes", () => {
const catRes = await app.request("/api/categories", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ name: "Shelter", emoji: "\u{26FA}" }),
body: JSON.stringify({ name: "Shelter", icon: "tent" }),
});
const cat = await catRes.json();