Documentation
¶
Index ¶
Constants ¶
const ( // SchemaVersionKey records the migrated settings schema version as a // JSON-encoded number in the settings table. SchemaVersionKey = "settings_schema_version" // CurrentSchemaVersion is the target version written by Apply. CurrentSchemaVersion = 1 )
Settings schema version bookkeeping. The settings table keeps the legacy *_cron / mode keys as the single runtime source of truth; v2 schedule keys are append-only semantic mirrors produced by this migration.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MigrationItem ¶
type MigrationItem struct {
Task string `json:"task"`
LegacyKey string `json:"legacyKey"`
LegacyValue string `json:"legacyValue"`
V2Key string `json:"v2Key"`
Schedule scheduler.ScheduleSpec `json:"schedule"`
}
MigrationItem describes one legacy -> v2 schedule conversion.
type MigrationPlan ¶
type MigrationPlan struct {
CurrentVersion int `json:"currentVersion"`
TargetVersion int `json:"targetVersion"`
Pending int `json:"pending"`
CustomCount int `json:"customCount"`
LegacyFieldsPreserved bool `json:"legacyFieldsPreserved"`
Items []MigrationItem `json:"items"`
}
MigrationPlan is the top-level flat preview of a pending migration.
type MigrationResult ¶
type MigrationResult struct {
MigrationPlan
Applied int `json:"applied"`
}
MigrationResult extends MigrationPlan with the number of rows actually written by Apply.