Refactor and improve database migration code patterns
- Dominant language
- Rust
- Stars
- 697
- Forks
- 200
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 65
Description
## Context
As discussed in PR #6286 (https://github.com/ChainSafe/forest/pull/6286), the current migration code for v0.31.0 follows patterns inherited from previous migrations (e.g., v0.26.0). While this approach works, there are opportunities to improve the migration code quality and consistency across all migration files.
## Objectives
- Review and refactor migration code patterns across all existing migration files
- Improve error handling, logging, and progress reporting in migrations
- Ensure consistency in code style and structure across migration modules
- Update helper functions and utilities used in migrations
- Add or improve documentation for migration patterns
## Scope
This is a follow-up to PR #6286 which focused on removing the Indices column and providing a working migration path. The improvements should be addressed systematically across all migration files in `src/db/migration/`.
## References
- Original PR: #6286
- Comment thread: https://github.com/ChainSafe/forest/pull/6286
- Requestor: @akaladarshi
## Notes
This work was deferred from PR #6286 to keep that PR focused on its core functionality (removing Indices column and adding migration logic) and to allow for a more thorough, systematic improvement of all migration code in a dedicated PR.
Contributor guide
Assessment
This issue has not been assessed yet.