2024-06-20 02:42:33 +09:00
|
|
|
mod v20240701;
|
2024-06-20 02:07:34 +09:00
|
|
|
|
2024-06-20 02:42:33 +09:00
|
|
|
use super::ConfigVersion;
|
2024-06-20 02:07:34 +09:00
|
|
|
|
|
|
|
#[derive(thiserror::Error, Debug)]
|
2024-06-20 02:42:33 +09:00
|
|
|
pub(crate) enum ConfigMigrateError {
|
2024-06-20 03:19:20 +09:00
|
|
|
#[error(transparent)]
|
|
|
|
V20240701(#[from] v20240701::Error),
|
2024-06-20 02:07:34 +09:00
|
|
|
}
|
|
|
|
|
2024-06-20 03:19:20 +09:00
|
|
|
pub(super) async fn run(version: ConfigVersion) -> Result<(), ConfigMigrateError> {
|
2024-06-20 02:42:33 +09:00
|
|
|
match version {
|
2024-06-20 03:19:20 +09:00
|
|
|
ConfigVersion::V20240701 => v20240701::run().await?,
|
2024-06-20 02:07:34 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|