AJ ONeal 75e4a883b7
ref(sqlmigrate): split Migration into Migration + Script
Migration{ID, Name} is the identity type returned by Up/Down/Latest/Drop.
Script{Migration, Up, Down} holds collected SQL content from Collect().

Migrator interface now takes SQL as a separate parameter:
  ExecUp(ctx, Migration, sql string)
  ExecDown(ctx, Migration, sql string)

This separates identity from content — callers that track what ran
don't need to carry around SQL strings they'll never use.

Updates shmigrate to match (ignores the sql parameter, references
files on disk instead).
2026-04-09 03:21:46 -06:00

8 lines
216 B
Modula-2

module github.com/therootcompany/golib/database/sqlmigrate/shmigrate
go 1.26.1
require github.com/therootcompany/golib/database/sqlmigrate v1.0.0
replace github.com/therootcompany/golib/database/sqlmigrate => ../