Fix slasher database schema migration to v2 (#2125)

## Issue Addressed

Closes #2119

## Proposed Changes

Update the slasher schema version to v2 for the breaking changes to the config introduced in #2079. Implement a migration from v1 to v2 so that users can seamlessly upgrade from any version of Lighthouse <=1.0.5.

Users who deleted their database for v1.0.5 can upgrade to a release including this patch without any manual intervention. Similarly, any users still on v1.0.4 or earlier can now upgrade without having to drop their database.
This commit is contained in:
Michael Sproul
2020-12-28 05:09:19 +00:00
parent 78d17c3255
commit 43ac3f7209
4 changed files with 90 additions and 14 deletions

View File

@@ -9,6 +9,7 @@ pub mod config;
mod database;
mod error;
pub mod metrics;
mod migrate;
mod slasher;
pub mod test_utils;
mod utils;