feat(migrate): add lifecycle commands and standalone authoring

This commit is contained in:
end committed 2026-10-28 15:22:30 -07:00
1 parent 3cd3f49c11
commit 2727ac83db
12 files changed
+1553 -31

No files matched your search

+7 -4
View File
@@ -23,10 +23,13 @@ import (
// across providers/processes. PostgreSQL connections must preserve session
// affinity (transaction-pooling proxies cannot safely hold session locks).
//
// Use the returned Provider's Up, UpTo, DownTo, Status, GetDBVersion, GetVersions,
// and HasPending methods directly. Create migration files with Goose's create
// command; lexical filename order must match numeric version order. Go migrations
// are registered per provider; global Go registration is ignored.
// Use the returned Provider's Up, UpTo, Down, DownTo, Status, GetDBVersion, GetVersions,
// and HasPending methods directly. Create and reconcile sources with the standalone
// corestack-goose tool (go run go.auvem.com/corestack/cmd/corestack-goose).
// Pass migrations.GoMigrations()... from its generated package; stock Goose Go
// output uses an incompatible global init registry. Lexical filename order must
// match numeric version order. Each provider needs fresh Go registrations;
// global Go registration is ignored.
func New(db *sql.DB, dialect goose.Dialect, files embed.FS, dir string, logger *slog.Logger, migrations ...*goose.Migration) (*goose.Provider, error) {
for i, migration := range migrations {
if migration == nil {