feat: Add created_by field to issues (GH#748)

Add a created_by field to track who created each issue, similar to how
comments have an author field.

- Add CreatedBy string field to Issue struct
- Add migration 029 to add created_by column to issues table
- Update all SELECT/INSERT/Scan statements across storage layer
- Populate created_by in bd create from actor chain
- Display created_by in bd show output

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-26 13:33:54 -08:00
parent 6862f6e35b
commit c3ef1c3f38
14 changed files with 77 additions and 29 deletions

View File

@@ -470,6 +470,7 @@ func TestMigrateContentHashColumn(t *testing.T) {
assignee TEXT,
estimated_minutes INTEGER,
created_at DATETIME NOT NULL,
created_by TEXT DEFAULT '',
updated_at DATETIME NOT NULL,
closed_at DATETIME,
external_ref TEXT,
@@ -497,7 +498,7 @@ func TestMigrateContentHashColumn(t *testing.T) {
waiters TEXT DEFAULT '',
CHECK ((status = 'closed') = (closed_at IS NOT NULL))
);
INSERT INTO issues SELECT id, title, description, design, acceptance_criteria, notes, status, priority, issue_type, assignee, estimated_minutes, created_at, updated_at, closed_at, external_ref, compaction_level, compacted_at, original_size, compacted_at_commit, source_repo, '', NULL, '', '', '', '', 0, 0, 0, '', '', '', '', '', '', 0, '' FROM issues_backup;
INSERT INTO issues SELECT id, title, description, design, acceptance_criteria, notes, status, priority, issue_type, assignee, estimated_minutes, created_at, '', updated_at, closed_at, external_ref, compaction_level, compacted_at, original_size, compacted_at_commit, source_repo, '', NULL, '', '', '', '', 0, 0, 0, '', '', '', '', '', '', 0, '' FROM issues_backup;
DROP TABLE issues_backup;
`)
if err != nil {