File tree Expand file tree Collapse file tree
vectorctl-cli/src/commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,6 +51,10 @@ pub enum MigrateSubcommands {
5151 #[ arg( long, required = false ) ]
5252 to : Option < String > ,
5353 } ,
54+ #[ command( ) ]
55+ Refresh ,
56+ #[ command( ) ]
57+ Reset ,
5458 #[ command( about = "Get migration status" ) ]
5559 Status ,
5660}
@@ -77,7 +81,9 @@ pub async fn run_migrate_command(
7781 sub @ Some ( MigrateSubcommands :: Generate { .. } )
7882 | sub @ Some ( MigrateSubcommands :: Up { .. } )
7983 | sub @ Some ( MigrateSubcommands :: Down { .. } )
80- | sub @ Some ( MigrateSubcommands :: Status ) => {
84+ | sub @ Some ( MigrateSubcommands :: Status )
85+ | sub @ Some ( MigrateSubcommands :: Refresh )
86+ | sub @ Some ( MigrateSubcommands :: Reset ) => {
8187 let ( cmd_str, extra_args) = match sub {
8288 Some ( MigrateSubcommands :: Generate { name, message } ) => ( "generate" , {
8389 let mut args = vec ! [ name] ;
@@ -100,6 +106,8 @@ pub async fn run_migrate_command(
100106 . collect ( ) ,
101107 ) ,
102108 Some ( MigrateSubcommands :: Status ) => ( "status" , vec ! [ ] ) ,
109+ Some ( MigrateSubcommands :: Refresh ) => ( "refresh" , vec ! [ ] ) ,
110+ Some ( MigrateSubcommands :: Reset ) => ( "reset" , vec ! [ ] ) ,
103111 _ => ( "up" , vec ! [ ] ) ,
104112 } ;
105113
Original file line number Diff line number Diff line change @@ -130,6 +130,8 @@ where
130130 }
131131 Some ( MigrateSubcommands :: Up { to } ) => M :: up ( & context, to) . await ?,
132132 Some ( MigrateSubcommands :: Down { to } ) => M :: down ( & context, to) . await ?,
133+ Some ( MigrateSubcommands :: Refresh ) => M :: refresh ( & context) . await ?,
134+ Some ( MigrateSubcommands :: Reset ) => M :: reset ( & context) . await ?,
133135 Some ( MigrateSubcommands :: Status ) => M :: status ( & context) . await ?,
134136 None => M :: up ( & context, None ) . await ?,
135137 }
You can’t perform that action at this time.
0 commit comments