9f7a65b136
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.
34 lines
644 B
JSON
34 lines
644 B
JSON
{
|
|
"version": "7",
|
|
"dialect": "pg",
|
|
"entries": [
|
|
{
|
|
"idx": 0,
|
|
"version": "7",
|
|
"when": 1794941009107,
|
|
"tag": "0000_loose_wendell_vaughn",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 1,
|
|
"version": "7",
|
|
"when": 1794941123648,
|
|
"tag": "0001_fluffy_vivisector",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 2,
|
|
"version": "7",
|
|
"when": 1794959606685,
|
|
"tag": "0002_fearless_doctor_spectrum",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 3,
|
|
"version": "7",
|
|
"when": 1794961261600,
|
|
"tag": "0003_whole_crystal",
|
|
"breakpoints": true
|
|
}
|
|
]
|
|
} |