fn with_locked_version<F>(db_path: &str, script: F) -> Result<usize, Error> where
    F: Fn(&Version) -> Result<usize, Error>,