mirror of
https://github.com/therootcompany/golib.git
synced 2026-04-24 12:48:00 +00:00
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).
8 lines
216 B
Modula-2
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 => ../
|