ST-1239: Atomische database-migratie — todos naar ideas + droppen todos-tabel (#132)
* feat(cleanup): verwijder Todo's navlink en todo-referenties uit marketing page [cmotto5ia000nx3178lq6xk8d]
- nav-bar.tsx: Todo's navLink verwijderd; Ideas-link blijft staan
- app/page.tsx: /todos quick-access link, feature-entry en /api/todos API-doc verwijderd
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(cleanup): verwijder app/(app)/todos/ en components/todos/ [cmottjvzo000cx3172472cu4g]
* test(cleanup): verwijder POST /api/todos import en describe-block uit security.test.ts [cmotto5jn000px317kjqlba89]
- Import 'POST as postTodo' uit verwijderde todos-route verwijderd
- describe('POST /api/todos') sectie (3 tests) verwijderd
- 73 testfiles / 561 tests groen
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(cleanup): verwijder __tests__/api/todos.test.ts en __tests__/actions/todos-promote-idea.test.ts [cmottjw1u000fx317igq27mh5]
* feat(cleanup): verwijder actions/todos.ts en app/api/todos/route.ts; verplaats updateRolesAction naar actions/settings.ts [cmottjvy9000ax3173sgfjcqs]
* feat(db): migratie todos→ideas, counters bijwerken, todos dropt [cmotto5fh000jx317r7c5srvb]
Nieuwe Prisma-migratie die in één transactie actieve todos omzet naar
DRAFT-ideas met unieke IDEA-NNN codes, idea_code_counter per user
bijwerkt, en de todos-tabel dropt.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(schema): verwijder Todo model en relaties uit prisma/schema.prisma [cmottjvwu0008x317fwwodg3i]
* feat(cleanup): vervang open_todos door open_ideas in /api/products/:id/claude-context
Laatste prisma.todo-referentie verwijderd. Endpoint geeft nu open_ideas terug
(ideeën van de gebruiker voor dit product die niet gearchiveerd zijn en nog
niet status PLANNED hebben). Docs bijgewerkt in docs/api.md en
docs/api/rest-contract.md.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c18d17108c
commit
ab8c3dca3f
6 changed files with 85 additions and 34 deletions
|
|
@ -29,14 +29,26 @@ export async function GET(
|
|||
return Response.json({ error: 'Product niet gevonden' }, { status: 404 })
|
||||
}
|
||||
|
||||
const [activeSprint, openTodos] = await Promise.all([
|
||||
const [activeSprint, openIdeas] = await Promise.all([
|
||||
prisma.sprint.findFirst({
|
||||
where: { product_id: id, status: 'ACTIVE' },
|
||||
select: { id: true, sprint_goal: true, status: true },
|
||||
}),
|
||||
prisma.todo.findMany({
|
||||
where: { user_id: auth.userId, product_id: id, done: false, archived: false },
|
||||
select: { id: true, title: true, description: true, created_at: true },
|
||||
prisma.idea.findMany({
|
||||
where: {
|
||||
user_id: auth.userId,
|
||||
product_id: id,
|
||||
archived: false,
|
||||
status: { not: 'PLANNED' },
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
code: true,
|
||||
title: true,
|
||||
description: true,
|
||||
status: true,
|
||||
created_at: true,
|
||||
},
|
||||
orderBy: { created_at: 'asc' },
|
||||
take: 50,
|
||||
}),
|
||||
|
|
@ -89,6 +101,6 @@ export async function GET(
|
|||
product,
|
||||
active_sprint: activeSprint,
|
||||
next_story: nextStoryPayload,
|
||||
open_todos: openTodos,
|
||||
open_ideas: openIdeas,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue