Skip to content
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

[Merged by Bors] - Add database schema versioning #1688

Closed
wants to merge 2 commits into from

Conversation

michaelsproul
Copy link
Member

Issue Addressed

Closes #673

Proposed Changes

Store a schema version in the database so that future releases can check they're running against a compatible database version. This would also enable automatic migration on breaking database changes, but that's left as future work.

The database config is also stored in the database so that the slots_per_restore_point value can be checked for consistency, which closes #673

@michaelsproul michaelsproul added ready-for-review The code is ready for review v0.3.0 For inclusion in v0.3.0 A0 labels Sep 29, 2020
@paulhauner
Copy link
Member

paulhauner commented Sep 29, 2020

Hey I think this might need a rebase -i onto v0.3.0-staging, since it was rebased on master to obtain #1532 (directory restructure).

@michaelsproul
Copy link
Member Author

Done

@michaelsproul
Copy link
Member Author

Added a commit to clarify those 0 keys that everyone stumbles on too 😅

Copy link
Member

@paulhauner paulhauner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!


// All the keys that get stored under the `BeaconMeta` column.
//
// We use `repeat_byte` because it's a const fn.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, cool

@michaelsproul
Copy link
Member Author

Thanks!

bors r+

bors bot pushed a commit that referenced this pull request Sep 30, 2020
## Issue Addressed

Closes #673

## Proposed Changes

Store a schema version in the database so that future releases can check they're running against a compatible database version. This would also enable automatic migration on breaking database changes, but that's left as future work.

The database config is also stored in the database so that the `slots_per_restore_point` value can be checked for consistency, which closes #673
@bors bors bot changed the title Add database schema versioning [Merged by Bors] - Add database schema versioning Sep 30, 2020
@bors bors bot closed this Sep 30, 2020
@michaelsproul michaelsproul deleted the database-versioning branch September 30, 2020 03:50
paulhauner pushed a commit that referenced this pull request Oct 1, 2020
## Issue Addressed

Closes #673

## Proposed Changes

Store a schema version in the database so that future releases can check they're running against a compatible database version. This would also enable automatic migration on breaking database changes, but that's left as future work.

The database config is also stored in the database so that the `slots_per_restore_point` value can be checked for consistency, which closes #673
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review The code is ready for review v0.3.0 For inclusion in v0.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants