Rename lists -> projects and items -> cards throughout
Project scope shifts from a todo list to a project-management app. This is a straight terminology rename across code, comments, migrations, tests, and docs — no behaviour change. - DB: table todo_lists -> projects, todo_items -> cards, column todo_items.list_id -> cards.project_id, indexes renamed. Migrations 003/004 rewritten in place (destructive; recreate the volume with `down -v`). - API: /api/lists -> /api/projects, nested /items -> /cards, reorder body item_ids -> card_ids, JSON keys list/lists/item/items -> project/projects/ card/cards, item_count -> card_count, list_id -> project_id, and the matching error messages. - PHP: TodoList/TodoItem Repository + Controller -> Project/Card; shared SQL aliases l/i -> p/c. - Frontend: stores lists.ts/items.ts -> projects.ts/cards.ts (useProjectsStore / useCardsStore, MAX_PROJECTS), ListView -> ProjectView, TodoItemRow -> CardRow, route /lists/:id -> /projects/:id (name "project"), types TodoList/ TodoItem -> Project/Card, and all UI copy. CSS .lists*/.list-head* -> .projects*/.project-head*, .item* -> .card-row* (kept the generic .card panel class), .items -> .cards. - Product name in the header, PWA manifest, index.html title and package descriptions -> "Project Manager" / "Projects". Backend suite: 37 passing. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
CREATE TABLE IF NOT EXISTS todo_lists (
|
||||
CREATE TABLE IF NOT EXISTS projects (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
owner_id INTEGER NOT NULL REFERENCES users (id) ON DELETE CASCADE,
|
||||
title TEXT NOT NULL,
|
||||
@@ -7,4 +7,4 @@ CREATE TABLE IF NOT EXISTS todo_lists (
|
||||
updated_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now'))
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_todo_lists_owner ON todo_lists (owner_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_projects_owner ON projects (owner_id);
|
||||
@@ -1,6 +1,6 @@
|
||||
CREATE TABLE IF NOT EXISTS todo_items (
|
||||
CREATE TABLE IF NOT EXISTS cards (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
list_id INTEGER NOT NULL REFERENCES todo_lists (id) ON DELETE CASCADE,
|
||||
project_id INTEGER NOT NULL REFERENCES projects (id) ON DELETE CASCADE,
|
||||
text TEXT NOT NULL,
|
||||
complete INTEGER NOT NULL DEFAULT 0 CHECK (complete IN (0, 1)),
|
||||
position INTEGER NOT NULL DEFAULT 0,
|
||||
@@ -8,4 +8,4 @@ CREATE TABLE IF NOT EXISTS todo_items (
|
||||
updated_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now'))
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_todo_items_list_position ON todo_items (list_id, position);
|
||||
CREATE INDEX IF NOT EXISTS idx_cards_project_position ON cards (project_id, position);
|
||||
Reference in New Issue
Block a user