Commit Graph

1 Commits

Author SHA1 Message Date
Charles P. Cross
a82f393e49 fix(storage): implement RenameDependencyPrefix to preserve dependencies (#642)
* fix(storage): implement RenameDependencyPrefix to update dependency records

RenameDependencyPrefix was previously a no-op that returned nil without
updating any records. This caused dependencies to break after using
bd rename-prefix, as the issue_id and depends_on_id columns in the
dependencies table still referenced the old prefix.

The fix updates both columns in the dependencies table to use the new
prefix, ensuring all dependency relationships are preserved.

Fixes #630

* test(storage): add regression tests for RenameDependencyPrefix

Add tests verifying that RenameDependencyPrefix:
- Executes without error when no dependencies exist
- Can be called with various prefix combinations

These tests ensure the fix for GH#630 doesn't regress.

---------

Co-authored-by: Charles P. Cross <cpdata@users.noreply.github.com>
2025-12-19 17:52:44 -08:00