mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Delete old database schemas (#6051)
* Delete old database schemas * Fix docs (thanks CK) * Fix beacon-chain tests
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
//! Utilities for managing database schema changes.
|
||||
mod migration_schema_v17;
|
||||
mod migration_schema_v18;
|
||||
mod migration_schema_v19;
|
||||
mod migration_schema_v20;
|
||||
mod migration_schema_v21;
|
||||
|
||||
@@ -54,32 +51,8 @@ pub fn migrate_schema<T: BeaconChainTypes>(
|
||||
}
|
||||
|
||||
//
|
||||
// Migrations from before SchemaVersion(16) are deprecated.
|
||||
// Migrations from before SchemaVersion(19) are deprecated.
|
||||
//
|
||||
(SchemaVersion(16), SchemaVersion(17)) => {
|
||||
let ops = migration_schema_v17::upgrade_to_v17::<T>(db.clone(), log)?;
|
||||
db.store_schema_version_atomically(to, ops)
|
||||
}
|
||||
(SchemaVersion(17), SchemaVersion(16)) => {
|
||||
let ops = migration_schema_v17::downgrade_from_v17::<T>(db.clone(), log)?;
|
||||
db.store_schema_version_atomically(to, ops)
|
||||
}
|
||||
(SchemaVersion(17), SchemaVersion(18)) => {
|
||||
let ops = migration_schema_v18::upgrade_to_v18::<T>(db.clone(), log)?;
|
||||
db.store_schema_version_atomically(to, ops)
|
||||
}
|
||||
(SchemaVersion(18), SchemaVersion(17)) => {
|
||||
let ops = migration_schema_v18::downgrade_from_v18::<T>(db.clone(), log)?;
|
||||
db.store_schema_version_atomically(to, ops)
|
||||
}
|
||||
(SchemaVersion(18), SchemaVersion(19)) => {
|
||||
let ops = migration_schema_v19::upgrade_to_v19::<T>(db.clone(), log)?;
|
||||
db.store_schema_version_atomically(to, ops)
|
||||
}
|
||||
(SchemaVersion(19), SchemaVersion(18)) => {
|
||||
let ops = migration_schema_v19::downgrade_from_v19::<T>(db.clone(), log)?;
|
||||
db.store_schema_version_atomically(to, ops)
|
||||
}
|
||||
(SchemaVersion(19), SchemaVersion(20)) => {
|
||||
let ops = migration_schema_v20::upgrade_to_v20::<T>(db.clone(), log)?;
|
||||
db.store_schema_version_atomically(to, ops)
|
||||
|
||||
Reference in New Issue
Block a user