命令框架模块构建完成
This commit is contained in:
16
src/commands/db/migrate.rs
Normal file
16
src/commands/db/migrate.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use anyhow::Result;
|
||||
|
||||
#[derive(clap::Args)]
|
||||
pub struct MigrateArgs {
|
||||
/// 目标版本
|
||||
#[arg(short, long)]
|
||||
pub version: Option<String>,
|
||||
}
|
||||
|
||||
pub fn run(args: MigrateArgs) -> Result<()> {
|
||||
match args.version {
|
||||
Some(v) => println!("🗄️ 迁移数据库到版本: {}", v),
|
||||
None => println!("🗄️ 执行最新数据库迁移"),
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user