larzmigrate
Schema migrations, any backend.
Up/down schema migrations with checksum drift detection, over any DB-API database or the larzdb key-value backend. Rollback support and a clear status view.
larzscript pkg install migrate
What you get
- Up/down/rollback
- Checksum drift detection
- Any DB-API or larzdb
- Clear status view
Try it
import "migrate" as migrate
let r = migrate.new(nil)
let log = []
migrate.add(r, "001_users", "abc123", fn(ctx) { log.push("up 001") }, fn(ctx) { log.push("down 001") })
migrate.add(r, "002_posts", "def456", fn(ctx) { log.push("up 002") }, fn(ctx) { log.push("down 002") })
print(migrate.up(r, nil))
print(log)
print(migrate.status(r))Output
[001_users, 002_posts]
[up 001, up 002]
[{name: 001_users, state: applied}, {name: 002_posts, state: applied}]Why it's in the Larz Stack
larzmigrate is a real Larzscript package (larzscript pkg install migrate) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.