liboxen/command/
migrate.rs1use std::path::Path;
2
3use crate::{error::OxenError, model::LocalRepository};
4
5pub mod m20250111083535_add_child_counts_to_nodes;
6pub use m20250111083535_add_child_counts_to_nodes::AddChildCountsToNodesMigration;
7
8pub trait Migrate {
9 fn up(&self, path: &Path, all: bool) -> Result<(), OxenError>;
10 fn down(&self, path: &Path, all: bool) -> Result<(), OxenError>;
11 fn is_needed(&self, repo: &LocalRepository) -> Result<bool, OxenError>;
12 fn name(&self) -> &'static str;
13 fn description(&self) -> &'static str;
14}