Add migrate cli command
This commit is contained in:
parent
909399b276
commit
9d2d1fa3c1
9 changed files with 31 additions and 1247 deletions
|
|
@ -1,4 +1,4 @@
|
|||
mod init;
|
||||
mod migrate;
|
||||
|
||||
use clap::Parser;
|
||||
|
||||
|
|
@ -6,13 +6,13 @@ use crate::Environment;
|
|||
|
||||
#[derive(Debug, Parser)]
|
||||
pub enum Command {
|
||||
Init(init::Command),
|
||||
Migrate(migrate::Command),
|
||||
}
|
||||
|
||||
impl Command {
|
||||
pub fn run(self, env: &Environment) -> anyhow::Result<()> {
|
||||
match self {
|
||||
Self::Init(command) => command.run(env),
|
||||
Self::Migrate(command) => command.run(env),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue