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
Owner

Add caller-selected apply/require startup policies and native migrate up, up-to <version>, down, down-to <version> and status commands for selected database modules. The adapter lives in migrate/lifecycle, keeps base migrate independent of lifecycle, preserves caller database ownership, and shares the root module's dependencies and version stream.

Add standalone corestack-goose create/fix for SQL and Go migrations through go install/go run. Both commands accept optional --dir, defaulting to the current working directory. Generated Go uses fresh provider-local registrations; fix reconciles filenames and explicit versions so the generate → register → fix workflow still compiles unchanged. Production applications import runtime code only; dependency and symbol checks verify the standalone artifact boundary. Reconciliation supports the generated layout and one source writer: take a complete source backup first; it never rewrites database history and does not provide atomic multi-file recovery. A concise README and accepted ADR explain the workflow and constraints.

Validation: required local build, vet, race tests, pinned lint, docs, TODO, formatting and diff checks passed (logs: /tmp/corestack-go-9/followup). Generated SQL/Go reconciliation, SQLite application/provider isolation and standalone artifact checks passed; PostgreSQL integration is configured in CI. Original independent standard/high reviews remain complete; the latest independent delta review found no Blocking, Major or Minor findings.

Ready for merge consideration: published head 8260f9c34dd652cef8cd59a28091efec10978840 passed ci / check (including configured PostgreSQL integration) and Documentation / docs. No history rewrite, merge or release is part of this delivery.

Closes #9

Add caller-selected apply/require startup policies and native `migrate up`, `up-to <version>`, `down`, `down-to <version>` and `status` commands for selected database modules. The adapter lives in `migrate/lifecycle`, keeps base migrate independent of lifecycle, preserves caller database ownership, and shares the root module's dependencies and version stream. Add standalone `corestack-goose create`/`fix` for SQL and Go migrations through go install/go run. Both commands accept optional `--dir`, defaulting to the current working directory. Generated Go uses fresh provider-local registrations; fix reconciles filenames and explicit versions so the generate → register → fix workflow still compiles unchanged. Production applications import runtime code only; dependency and symbol checks verify the standalone artifact boundary. Reconciliation supports the generated layout and one source writer: take a complete source backup first; it never rewrites database history and does not provide atomic multi-file recovery. A concise README and accepted ADR explain the workflow and constraints. Validation: required local build, vet, race tests, pinned lint, docs, TODO, formatting and diff checks passed (logs: `/tmp/corestack-go-9/followup`). Generated SQL/Go reconciliation, SQLite application/provider isolation and standalone artifact checks passed; PostgreSQL integration is configured in CI. Original independent standard/high reviews remain complete; the latest independent delta review found no Blocking, Major or Minor findings. Ready for merge consideration: published head `8260f9c34dd652cef8cd59a28091efec10978840` passed [ci / check](https://gitea.auvem.com/corestack/go/actions/runs/2744) (including configured PostgreSQL integration) and [Documentation / docs](https://gitea.auvem.com/corestack/go/actions/runs/2745). No history rewrite, merge or release is part of this delivery. Closes #9
end added 5 commits 2026-10-28 15:30:51 -07:00
end added 1 commit 2026-10-28 15:31:13 -07:00
docs: record migration implementation publication
Documentation / docs (pull_request) Successful in 19s
ci / check (pull_request) Successful in 40s
501629f225
Author
Owner

Delivery is ready for merge review at 501629f225aa416a6e34213b6081966cf87d2f77.

Independent standard and fresh high reviews of implementation 2727ac8 completed with no Blocking/Major findings. High review's Minor R1 was corrected in 66abdaf (Goose up-to 0 documentation/comment only); the remaining final-head delta records ADR delivery and this PR URL.

Both final-head checks passed: ci / check and Documentation / docs. CI ran the race suite with PostgreSQL configured, including the migration package, plus generated-consumer/artifact checks, lint and the release snapshot checks. Local PostgreSQL tests were skipped without DSNs.

The supported authoring boundary remains single-writer source editing with a complete backup before fix; renumbering does not update database history. No merge or release was performed.

Delivery is ready for merge review at `501629f225aa416a6e34213b6081966cf87d2f77`. Independent standard and fresh high reviews of implementation `2727ac8` completed with no Blocking/Major findings. High review's Minor R1 was corrected in `66abdaf` (Goose `up-to 0` documentation/comment only); the remaining final-head delta records ADR delivery and this PR URL. Both final-head checks passed: [ci / check](https://gitea.auvem.com/corestack/go/actions/runs/2738) and [Documentation / docs](https://gitea.auvem.com/corestack/go/actions/runs/2739). CI ran the race suite with PostgreSQL configured, including the migration package, plus generated-consumer/artifact checks, lint and the release snapshot checks. Local PostgreSQL tests were skipped without DSNs. The supported authoring boundary remains single-writer source editing with a complete backup before `fix`; renumbering does not update database history. No merge or release was performed.
end added 2 commits 2026-10-28 15:43:26 -07:00
docs: tighten migration authoring and adapter guidance
Documentation / docs (pull_request) Successful in 20s
ci / check (pull_request) Successful in 45s
8260f9c34d
end merged commit a99e364ac3 into main 2026-10-28 16:10:40 -07:00
end deleted branch feat/migrate-lifecycle 2026-10-28 16:10:41 -07:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: corestack/go#18