Documentation
¶
Overview ¶
Package migration provides deterministic, module-owned database migration plans with checksum drift detection and dialect-owned execution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Applied ¶
type Applied struct {
Version uint64
Module string
Name string
Checksum string
AppliedAt time.Time
}
Applied is one durable migration registry record.
type Backend ¶
Backend owns dialect-specific locking and transaction policy. RunLocked must invoke work exactly once while concurrent migration runners are excluded.
type Migration ¶
type Migration struct {
// contains filtered or unexported fields
}
Migration is one immutable normalized plan entry.
type Observation ¶
type Observation struct {
Version uint64
Module string
Name string
Duration time.Duration
Err error
}
Observation contains bounded metadata and no SQL text.
type Observer ¶
type Observer func(context.Context, Observation)
Observer receives completed migration attempts synchronously.
type Plan ¶
type Plan struct {
// contains filtered or unexported fields
}
Plan is an immutable migration sequence ordered by global version.
func (*Plan) Migrations ¶
Migrations returns a defensive copy of the deterministic sequence.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner reconciles and applies one immutable plan.