Documentation
¶
Overview ¶
Package migrate provides versioned schema upgrade and repair for .cloop directories. It detects the current schema version, runs idempotent migration steps, and repairs common corruption such as orphaned snapshot files and missing columns.
Index ¶
Constants ¶
View Source
const CurrentVersion = 2
CurrentVersion is the highest schema version this binary understands.
Variables ¶
This section is empty.
Functions ¶
func NeedsUpgrade ¶
NeedsUpgrade returns true when the .cloop directory exists but the schema version is behind CurrentVersion. It never returns an error on missing dirs.
Types ¶
type RepairReport ¶
type RepairReport struct {
Kind string // "orphan_snapshot", "missing_column", "invalid_config_key"
Detail string
Fixed bool
}
RepairReport describes a single repair action.
Click to show internal directories.
Click to hide internal directories.