B3: catalog taxonomy CRUD (categories, vendors, technologies, functions)
Create/rename/deactivate for the four taxonomy tables. Deactivate not delete; slug frozen after creation; FKs ON DELETE RESTRICT. - src/db/schema.ts: four tables + relations (ON DELETE RESTRICT FKs) - src/lib/slug.ts: slugify (lowercase, ASCII-fold, collapse runs) + 6 tests - src/db/catalog.ts: listCatalog (active filter), deactivateCatalog (soft delete), per-entity create*/update* (slug generated at create, frozen on update; update patches only present fields) - src/app/api/dev/catalog/route.ts: GET/POST/PATCH; Zod per entity; DB constraint errors mapped to 409 (dup slug) / 400 (dangling FK) via cause chain - drizzle/0003_whole_crystal.sql Verification: typecheck, lint, 36 unit tests (+6), build, db:migrate all exit 0. Runtime smoke: create -> rename keeps slug -> deactivate hides from pickers but row persists (all four types); partial PATCH preserves omitted fields; validation 400/400/400/409.
This commit is contained in: