-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(db): add database version management system #431
Conversation
b80d750
to
4ea1c36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm would be great to add documentation for contributors on how to trigger bump_db
2945ec5
to
4bd1826
Compare
4bd1826
to
422acc5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very cool!
391b694
to
97ea3f1
Compare
97ea3f1
to
be742e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good!
//! current_version: 42 | ||
//! versions: | ||
//! - version: 42 | ||
//! pr: 123 | ||
//! - version: 41 | ||
//! pr: 120 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//! current_version: 42 | |
//! versions: | |
//! - version: 42 | |
//! pr: 123 | |
//! - version: 41 | |
//! pr: 120 | |
//! current_version: 69 | |
//! versions: | |
//! - version: 69 | |
//! pr: 420 | |
//! - version: 68 | |
//! pr: 419 |
Pull Request type
Please add the labels corresponding to the type of changes your PR introduces:
What is the current behavior?
Currently there is no system to manage database version compatibility between binary releases. This can lead to data corruption or unexpected behavior when users upgrade their binary without migrating their database.
Resolves: #NA
What is the new behavior?
Key components added:
.db-versions.yml
file to track version history with PR referencesFiles added/modified:
.db-versions.yml
- Version tracking filescripts/update-db-version.sh
- Version bump script.github/workflows/pull_request.yml
- CI integration.github/workflows/db-version.yml
- CI integrationcrates/client/db/build.rs
- Build-time version extractioncrates/client/db/src/db_version.rs
Runtime version validation code.github/labels.yml
- Added 'bump_db' labelDoes this introduce a breaking change?
No, this is a new feature that adds safety checks without modifying existing behavior. However, after this PR:
Other information
To use the new version system: