Skip to content

Commit

Permalink
Bump katana database version (#1833)
Browse files Browse the repository at this point in the history
bump database version to `1` for the next release due to breaking changes introduced in #1773, #1774, #1775
  • Loading branch information
kariy authored Apr 24, 2024
1 parent 2fabab7 commit 77df165
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion crates/katana/storage/db/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -74,3 +74,13 @@ pub(super) fn get_db_version(path: impl AsRef<Path>) -> Result<u32, DatabaseVers
pub(super) fn default_version_file_path(path: &Path) -> 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")
}
}

0 comments on commit 77df165

Please sign in to comment.