Skip to content

Commit 57775e7

Browse files
committed
more familiar subcommands for migrations
1 parent 2e4e9d8 commit 57775e7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/mig/Program.fs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ open migrate.Execution
77
open FsToolkit.ErrorHandling
88

99
type Args =
10-
| [<CliPrefix(CliPrefix.None)>] Gen of ParseResults<GenArgs>
11-
| [<CliPrefix(CliPrefix.None)>] Exec of ParseResults<ExecArgs>
10+
| [<CliPrefix(CliPrefix.None)>] Status of ParseResults<GenArgs>
11+
| [<CliPrefix(CliPrefix.None)>] Commit of ParseResults<ExecArgs>
1212
| [<CliPrefix(CliPrefix.None)>] Schema of ParseResults<SchemaArgs>
1313
| [<CliPrefix(CliPrefix.None)>] Import of ParseResults<ImportArgs>
1414
| [<CliPrefix(CliPrefix.None)>] Log of ParseResults<LogArgs>
@@ -20,8 +20,8 @@ type Args =
2020
interface IArgParserTemplate with
2121
member s.Usage =
2222
match s with
23-
| Gen _ -> "generates a migration script"
24-
| Exec _ -> "generates and executes step by step a migration script"
23+
| Status _ -> "generates a migration script"
24+
| Commit _ -> "generates and executes step by step a migration script"
2525
| Schema _ -> "show the database schema"
2626
| NoColors -> "when present deactivates the SQL syntax highlighting"
2727
| Import _ -> "imports Goose migrations from a directory"
@@ -206,9 +206,9 @@ let main args =
206206
try
207207
match command with
208208
| _ when results.Contains Version -> version ()
209-
| Some(Gen _) -> generate withColors
210-
| Some(Args.Exec flags) when withLog -> Exec.execAndLog flags
211-
| Some(Args.Exec _) -> Exec.exec ()
209+
| Some(Status _) -> generate withColors
210+
| Some(Args.Commit flags) when withLog -> Exec.execAndLog flags
211+
| Some(Args.Commit _) -> Exec.exec ()
212212
| Some(Schema _) -> schema withColors
213213
| Some(Import flags) when withLog -> Goose.importLog (withColors, flags)
214214
| Some(Import flags) -> Goose.import (withColors, flags)

0 commit comments

Comments
 (0)