beads/internal/storage/sqlite
beads/crew/darcy 9bcc618cd5 fix(migrate-issues): replace raw SQL with Storage interface for Dolt compatibility
migrate-issues used UnderlyingDB() type-assertion to SQLite and raw SQL
queries, which would fail on Dolt backend. Now uses the Storage interface:

- Add SourceRepo filter to IssueFilter (types, SQLite, Dolt SearchIssues)
- Add source_repo to allowed update fields (SQLite + Dolt)
- Replace raw SQL queries with SearchIssues, GetDependencyRecords,
  GetDependents, GetAllDependencyRecords, GetDependencyRecordsForIssues
- Replace raw transaction with RunInTransaction + UpdateIssue
- Remove database/sql and sqlite package imports

Closes: dolt-test-ztzb

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 16:04:12 -08:00
..
migrations style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
adaptive_e2e_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
adaptive_length.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
adaptive_length_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
batch_ops.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
batch_ops_test.go fix(sqlite): prevent FK constraint failure on batch create (GH#956) 2026-01-10 22:02:03 -08:00
batch_test.go Fix N+1 query pattern in export operations (bd-rcmg) 2025-11-23 19:53:44 -08:00
bench_helpers_test.go fix: Remove duplicate context variable declarations in benchmark tests 2025-11-23 19:35:52 -08:00
blocked_cache.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
blocked_cache_test.go feat: add session_id field to issue close/update mutations (bd-tksk) 2025-12-31 13:14:15 -08:00
child_counters_migration_test.go Extract SQLite migrations into separate files (bd-fb95094c.7) 2025-11-06 20:06:45 -08:00
child_counters_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
child_id_test.go fix: respect hierarchy.max-depth config setting (GH#995) (#997) 2026-01-10 13:36:52 -08:00
claim_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
collision.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
collision_test.go Document external_ref in content hash behavior (bd-9f4a) 2025-11-08 02:22:15 -08:00
comments.go feat: add comment_count to issue JSON views (list, ready, search) 2026-01-30 22:51:03 -08:00
comments_test.go fix: replace string(rune()) with strconv.Itoa in tests (bd-fmc) 2025-12-02 22:41:07 -08:00
compact.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
compact_bench_test.go fix: replace string(rune()) with strconv.Itoa in tests (bd-fmc) 2025-12-02 22:41:07 -08:00
compact_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
config.go chore: unexport ~29 dead symbols in internal/storage/sqlite 2026-02-07 09:29:56 -08:00
cycle_bench_test.go perf(sqlite): replace O(2^n) cycle detection with O(V+E) DFS 2025-12-28 06:04:05 -08:00
cycle_detection_test.go fix(deps): exclude relates-to from cycle detection (fixes #661) 2025-12-20 13:33:15 -08:00
delete_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
dependencies.go fix: address review comments on parent-child validation 2026-02-08 04:10:28 +00:00
dependencies_test.go fix: remove type-based parent-child validation that rejected custom types 2026-02-08 04:01:31 +00:00
dirty.go chore: unexport ~29 dead symbols in internal/storage/sqlite 2026-02-07 09:29:56 -08:00
dirty_helpers.go Refactor: consolidate ID generation and shared helpers (bd-0702, bd-1445) 2025-11-02 14:49:27 -08:00
dirty_test.go fix: Remove unsafe ClearDirtyIssues() method (bd-b6xo) 2025-12-17 19:10:13 -08:00
epics.go fix: centralize error handling patterns in storage layer (bd-bwk2) 2026-02-06 10:37:27 -08:00
epics_test.go feat: add session_id field to issue close/update mutations (bd-tksk) 2025-12-31 13:14:15 -08:00
error_scenarios_test.go test: add SQLite error scenario coverage for transactions and WAL (dolt-test-ptp) 2026-02-07 19:06:52 -08:00
errors.go chore: unexport ~29 dead symbols in internal/storage/sqlite 2026-02-07 09:29:56 -08:00
errors_test.go chore: unexport ~29 dead symbols in internal/storage/sqlite 2026-02-07 09:29:56 -08:00
events.go fix: centralize error handling patterns in storage layer (bd-bwk2) 2026-02-06 10:37:27 -08:00
events_helpers.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
events_test.go fix(state): allow event type in CreateIssue validation (#1398) 2026-01-30 22:18:44 -08:00
external_deps.go chore: unexport ~29 dead symbols in internal/storage/sqlite 2026-02-07 09:29:56 -08:00
external_ref_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
freshness.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
freshness_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
freshness_unix.go fix: Windows build + gosec lint errors (#585) 2025-12-16 13:26:51 -08:00
freshness_windows.go chore: unexport ~29 dead symbols in internal/storage/sqlite 2026-02-07 09:29:56 -08:00
gate_no_daemon_test.go refactor(types): remove Gas Town type constants from beads core (bd-w2zz4) 2026-01-21 10:36:59 -08:00
graph_links_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
hash.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
hash_id_test.go Context propagation with graceful cancellation (bd-rtp, bd-yb8, bd-2o2) 2025-11-20 21:57:23 -05:00
hash_ids.go fix(storage): add reconnectMu RLock protection to prevent race condition (#1054) 2026-01-12 18:29:42 -08:00
ids.go chore: unexport ~29 dead symbols in internal/storage/sqlite 2026-02-07 09:29:56 -08:00
ids_test.go chore: unexport ~29 dead symbols in internal/storage/sqlite 2026-02-07 09:29:56 -08:00
import_tx.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
inode_unix.go fix(ci): address Windows test failures and timeout 2026-01-06 12:59:26 -08:00
inode_windows.go fix(ci): address Windows test failures and timeout 2026-01-06 12:59:26 -08:00
issues.go feat: add spec_id support 2026-02-03 13:58:36 -07:00
label_filter_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
labels.go fix: centralize error handling patterns in storage layer (bd-bwk2) 2026-02-06 10:37:27 -08:00
labels_test.go fix: Remove unsafe ClearDirtyIssues() method (bd-b6xo) 2025-12-17 19:10:13 -08:00
metadata_test.go feat: allow UpdateIssue metadata updates via json.RawMessage/[]byte (#1417) 2026-02-03 17:55:23 -08:00
migration_invariants.go chore: unexport ~29 dead symbols in internal/storage/sqlite 2026-02-07 09:29:56 -08:00
migration_invariants_test.go chore: unexport ~29 dead symbols in internal/storage/sqlite 2026-02-07 09:29:56 -08:00
migrations.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
migrations_template_pinned_regression_test.go refactor: remove unused bd pin/unpin/hook commands (bd-x0zl) 2025-12-27 16:02:15 -08:00
migrations_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
multirepo.go fix: centralize error handling patterns in storage layer (bd-bwk2) 2026-02-06 10:37:27 -08:00
multirepo_export.go feat(context): centralize RepoContext API for git operations (#1102) 2026-01-15 07:55:08 -08:00
multirepo_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
orphan_handling_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
prefix_validation_test.go Context propagation with graceful cancellation (bd-rtp, bd-yb8, bd-2o2) 2025-11-20 21:57:23 -05:00
queries.go fix(migrate-issues): replace raw SQL with Storage interface for Dolt compatibility 2026-02-08 16:04:12 -08:00
readonly_test.go fix: read operations no longer modify database file (GH#804) 2025-12-30 16:47:38 -08:00
ready.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
ready_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
rename_dependency_prefix_test.go fix(storage): implement RenameDependencyPrefix to preserve dependencies (#642) 2025-12-19 17:52:44 -08:00
resurrection.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
resurrection_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
schema.go feat: centralize AI model config into ai.model with DefaultAIModel() 2026-02-06 17:45:04 -08:00
schema_probe.go chore: unexport ~29 dead symbols in internal/storage/sqlite 2026-02-07 09:29:56 -08:00
schema_probe_test.go chore: unexport ~29 dead symbols in internal/storage/sqlite 2026-02-07 09:29:56 -08:00
sqlite.go refactor: Split monolithic sqlite.go into focused files (bd-0a43) 2025-11-23 19:04:34 -08:00
sqlite_bench_test.go bench(sqlite): add isolated cache rebuild benchmarks (bd-zw72) 2026-01-02 17:30:58 -08:00
sqlite_test.go feat: add spec_id support 2026-02-03 13:58:36 -07:00
store.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
store_race_test.go chore: unexport ~29 dead symbols in internal/storage/sqlite 2026-02-07 09:29:56 -08:00
store_wsl_test.go fix(GH#1224): detect Docker Desktop bind mounts in WSL2 and disable WAL mode 2026-01-21 16:53:49 -08:00
test_helpers.go fix(ready): exclude molecule steps from bd ready by default (#1246) 2026-01-21 19:30:15 -08:00
tombstone_test.go fix(create): allow creating issues with explicit ID that matches tombstone (bd-0gm4r) 2026-01-14 20:36:47 -08:00
transaction.go fix: make --parent filtering include dotted-ID children (GH#1614) 2026-02-08 15:23:12 -08:00
transaction_test.go fix: address review comments on parent-child validation 2026-02-08 04:10:28 +00:00
underlying_db_test.go Context propagation with graceful cancellation (bd-rtp, bd-yb8, bd-2o2) 2025-11-20 21:57:23 -05:00
util.go chore: unexport ~29 dead symbols in internal/storage/sqlite 2026-02-07 09:29:56 -08:00
util_test.go chore: unexport ~29 dead symbols in internal/storage/sqlite 2026-02-07 09:29:56 -08:00
validators.go fix(import): support custom issue types during import (#1322) 2026-01-25 17:59:47 -08:00
validators_test.go fix(import): support custom issue types during import (#1322) 2026-01-25 17:59:47 -08:00
wal_test.go fix: add WAL checkpoint robustness with retry logic 2026-02-05 09:20:07 -08:00