De DB-tabel `public.todos` was buiten de migratie-historie om gedropt,
terwijl `prisma/schema.prisma` `model Todo` en migration_lock.toml geen
removal-migratie kenden. Gevolg: drift tussen schema (Todo aanwezig) en
DB (tabel weg) — runtime-fout op alle `prisma.todo.*`-calls in
`actions/todos.ts`, `app/api/todos/route.ts`, `app/(app)/todos/page.tsx`,
`app/api/products/[id]/claude-context/route.ts` en MCP-tool create_todo.
Deze migratie zet de tabel exact terug zoals het schema 'm beschrijft —
gegenereerd via:
npx prisma migrate diff --from-config-datasource \
--to-schema prisma/schema.prisma --script
CREATE TABLE todos + 2 indexes + 2 foreign keys naar users (CASCADE) en
products (SET NULL).
Eerdere data is niet hersteld (geen backup-stap); de tabel is leeg. Dat
is acceptabel: Todo's waren lichtgewicht notities zonder kritische data
en de removal-Idea staat nog gepland (zie #128 → re-plan met de
Make-Plan-prompt-update uit #130). Tot dat moment werken de Todo-flows
weer.
Verified locally: prisma migrate status (up to date), lint, typecheck,
tests 564/564, next build.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>