mod text;
use clap::{Arg, Command};
pub(crate) fn start() -> Command {
Command::new("start")
.about("Start a migration, serving old and new schema versions together")
.long_about(text::START)
.arg(
Arg::new("name")
.required(true)
.help("Migration directory name (<timestamp>-<name>)"),
)
}
pub(crate) fn complete() -> Command {
Command::new("complete")
.about("Complete the in-progress migration and retire the old version")
.long_about(text::COMPLETE)
}
pub(crate) fn rollback() -> Command {
Command::new("rollback-version")
.about("Undo the in-progress migration, keeping the previous version")
.long_about(text::ROLLBACK)
}
pub(crate) fn status() -> Command {
Command::new("version-status")
.about("Show the current schema version and any migration in progress")
.long_about(text::STATUS)
}