Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
created at
  • Loading branch information
mafredri committed Jan 21, 2026
commit 573d6d7c7c61b07109163c13ba8a222f436bc204
4 changes: 2 additions & 2 deletions coderd/database/dump.sql

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions coderd/database/migrations/000409_task_lifecycle.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
-- This table holds the conversation history from AgentAPI, allowing users to view
-- task logs even when the workspace is stopped.
CREATE TABLE task_snapshots (
task_id UUID NOT NULL PRIMARY KEY REFERENCES tasks (id) ON DELETE CASCADE,
log_snapshot JSONB NOT NULL,
log_snapshot_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
task_id UUID NOT NULL PRIMARY KEY REFERENCES tasks (id) ON DELETE CASCADE,
log_snapshot JSONB NOT NULL,
log_snapshot_created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

COMMENT ON TABLE task_snapshots IS 'Stores snapshots of task state when paused, currently limited to conversation history.';
COMMENT ON COLUMN task_snapshots.task_id IS 'The task this snapshot belongs to.';
COMMENT ON COLUMN task_snapshots.log_snapshot IS 'Task conversation history in JSON format, allowing users to view logs when the workspace is stopped.';
COMMENT ON COLUMN task_snapshots.log_snapshot_at IS 'When this snapshot was captured.';
COMMENT ON COLUMN task_snapshots.log_snapshot_created_at IS 'When this log snapshot was captured.';

-- Add build reasons for task lifecycle events.
-- These distinguish task pause/resume operations from regular workspace lifecycle events.
Expand Down
4 changes: 2 additions & 2 deletions coderd/database/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading