feat(migrate): configure Goose providers for embedded migrations #14

Merged
end merged 6 commits from feat/migrate into main 2026-10-27 23:07:23 -07:00
Showing only changes of commit 53826eb4cf - Show all commits
+9 -1
View File
@@ -5,7 +5,7 @@
It returns `*goose.Provider` directly: Goose owns execution, version tracking,
status, and errors. There is no lifecycle dependency or background work.
Consumers must create migration files with Goose's
Create SQL migration files with Goose's
[`create` command](https://pressly.github.io/goose/documentation/cli-commands/#create).
For timestamp-to-sequential reconciliation before deployment, use its
[`fix` command](https://pressly.github.io/goose/documentation/cli-commands/#fix)
@@ -13,6 +13,14 @@ as described in [hybrid versioning](https://github.com/pressly/goose#hybrid-vers
These commands edit source files before embedding; `fix` does not update database
history. Never renumber migrations already applied to shared databases.
**Goose's default Go template is not compatible unchanged with this package.**
It registers migrations globally from `init`, while this package uses explicit
provider-local registration. Until the compatible authoring CLI planned in
[#9](https://gitea.auvem.com/corestack/go/issues/9) is available, Go migrations
require the adaptation described below; do not treat stock `goose create ... go`
output as ready to use. That follow-up must supply and document the supported
creation/reconciliation workflow before it is complete.
Embed migrations in the application's binary and run them before serving traffic:
```go