feat(migrate): add lifecycle commands and standalone authoring #18

Merged
end merged 8 commits from feat/migrate-lifecycle into main 2026-10-28 16:10:40 -07:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 66abdaf30c - Show all commits

No files matched your search

+2 -1
View File
@@ -152,7 +152,8 @@ unrelated modules. Services are suppressed; the existing `lifecycle/cli.Action`
owns signals, cancellation, errors and reverse cleanup. Help and invalid arguments
never run setup. Target versions must be nonnegative decimal int64 values, with
no extra arguments; malformed usage returns exit 2 through `cli.Run`. Zero follows
Goose: `down-to 0` rolls everything back, while `up-to 0` is a runtime error.
Goose: `down-to 0` rolls everything back; `up-to 0` succeeds if nothing is pending,
but returns a runtime error when pending work reaches Goose's version validation.
Resolver/Goose/cleanup and status Writer failures return runtime errors (exit 1).
Supply the native command Writer and configured Goose logger for output.
+1 -1
View File
@@ -199,7 +199,7 @@ func TestCommandsSQLite(t *testing.T) {
t.Fatal(calls)
}
}
// Zero is valid syntax; Goose UpTo rejects it after setup, unlike DownTo(0).
// Zero is valid syntax; Goose UpTo rejects it after setup when migrations are pending.
code, err := run(t, []string{"up-to", "0"}, []lifecycle.Module{module}, resolver, &out)
if code != 1 || err == nil || !strings.Contains(err.Error(), "greater than 0") {
t.Fatalf("zero UpTo: code=%d err=%v", code, err)