From 77df165a7dafdccd4a59274f0c4e5ee5cc33972c Mon Sep 17 00:00:00 2001 From: Ammar Arif Date: Wed, 24 Apr 2024 09:57:22 +0800 Subject: [PATCH] Bump `katana` database version (#1833) bump database version to `1` for the next release due to breaking changes introduced in #1773, #1774, #1775 --- crates/katana/storage/db/src/version.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/crates/katana/storage/db/src/version.rs b/crates/katana/storage/db/src/version.rs index 58e68f6ae4..f77bc28b2f 100644 --- a/crates/katana/storage/db/src/version.rs +++ b/crates/katana/storage/db/src/version.rs @@ -5,7 +5,7 @@ use std::mem; use std::path::{Path, PathBuf}; /// Current version of the database. -pub const CURRENT_DB_VERSION: u32 = 0; +pub const CURRENT_DB_VERSION: u32 = 1; /// Name of the version file. const DB_VERSION_FILE_NAME: &str = "db.version"; @@ -74,3 +74,13 @@ pub(super) fn get_db_version(path: impl AsRef) -> Result PathBuf { path.join(DB_VERSION_FILE_NAME) } + +#[cfg(test)] +mod tests { + + #[test] + fn test_current_version() { + use super::CURRENT_DB_VERSION; + assert_eq!(CURRENT_DB_VERSION, 1, "Invalid current database version") + } +}