mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 05:44:44 +00:00
Add database schema versioning (#1688)
## 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
This commit is contained in:
committed by
Paul Hauner
parent
cdec3cec18
commit
22aedda1be
@@ -19,6 +19,7 @@ pub mod hot_cold_store;
|
||||
mod impls;
|
||||
mod leveldb_store;
|
||||
mod memory_store;
|
||||
mod metadata;
|
||||
mod metrics;
|
||||
mod partial_beacon_state;
|
||||
|
||||
@@ -153,7 +154,7 @@ pub enum DBColumn {
|
||||
}
|
||||
|
||||
impl Into<&'static str> for DBColumn {
|
||||
/// Returns a `&str` that can be used for keying a key-value data base.
|
||||
/// Returns a `&str` prefix to be added to keys before they hit the key-value database.
|
||||
fn into(self) -> &'static str {
|
||||
match self {
|
||||
DBColumn::BeaconMeta => "bma",
|
||||
|
||||
Reference in New Issue
Block a user