feat: Add version management, session tracking, and commit linking
Phase 1: Version Management - Migration 006: Add git_tag, git_sha columns to versions - New tools: version_add, version_list, version_show, version_update, version_release, version_assign_task - Links versions to git tags for release tracking Phase 2: Session/Task Activity Tracking - Migration 007: Create task_activity table - Track task changes per session (created, updated, status_change, closed) - Session ID from env/cache file (usage-stats format) - New tool: session_tasks to query tasks by session Phase 3: Commit-Task Linking - Migration 008: Create task_commits junction table - New tools: task_commit_add, task_commit_remove, task_commits_list, task_link_commits (batch parsing) - Stores SHA references only (Gitea MCP owns full data) - Commits shown in task_show output 17 new MCP tools total. All migrations applied to docker-host postgres. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
16
migrations/007_task_activity.sql
Normal file
16
migrations/007_task_activity.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
-- Migration 007: Task activity tracking for session integration
|
||||
-- Tracks which tasks were touched per session for audit trail
|
||||
|
||||
CREATE TABLE IF NOT EXISTS task_activity (
|
||||
id SERIAL PRIMARY KEY,
|
||||
task_id TEXT NOT NULL REFERENCES tasks(id) ON DELETE CASCADE,
|
||||
session_id TEXT NOT NULL,
|
||||
activity_type TEXT NOT NULL CHECK (activity_type IN ('created', 'updated', 'status_change', 'closed')),
|
||||
old_value TEXT,
|
||||
new_value TEXT,
|
||||
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_task_activity_session ON task_activity(session_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_task_activity_task ON task_activity(task_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_task_activity_time ON task_activity(created_at DESC);
|
||||
Reference in New Issue
Block a user