{"record":{"id":"1fc385405aef9e89","repo":"juanfont/headscale","slug":"version-upgrade-not-supported","errorCode":null,"errorMessage":"version upgrade not supported","messagePattern":"version upgrade not supported","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"hscontrol/db/versioncheck.go","lineNumber":17,"sourceCode":"package db\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/juanfont/headscale/hscontrol/types\"\n\t\"github.com/rs/zerolog/log\"\n\t\"gorm.io/gorm\"\n\t\"gorm.io/gorm/clause\"\n)\n\nvar errVersionUpgrade = errors.New(\"version upgrade not supported\")\n\nvar errVersionDowngrade = errors.New(\"version downgrade not supported\")\n\nvar errVersionMajorChange = errors.New(\"major version change not supported\")\n\nvar errVersionParse = errors.New(\"cannot parse version\")\n\nvar errVersionFormat = errors.New(\n\t\"version does not follow semver major.minor.patch format\",\n)\n\n// DatabaseVersion tracks the headscale version that last\n// successfully started against this database.\n// It is a single-row table (ID is always 1).\ntype DatabaseVersion struct {\n\tID        uint   `gorm:\"primaryKey\"`\n\tVersion   string `gorm:\"not null\"`\n\tUpdatedAt time.Time","sourceCodeStart":1,"sourceCodeEnd":35,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/hscontrol/db/versioncheck.go#L1-L35","documentation":"Error \"version upgrade not supported\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at hscontrol/db/versioncheck.go:17 when the library encounters an invalid state.","commonSituations":"The database was last written by a newer headscale version than the binary being started. Run a headscale version that matches or exceeds the database version; do not start old binaries against new databases.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (version upgrade not supported); retry the operation after fixing the input, configuration, or environment."],"exampleFix":"Inspect the wrapped error for the underlying cause and correct the failing condition (version upgrade not supported); retry the operation after fixing the input, configuration, or environment.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"565fd254d06c4c7f9a8cad1714a43445c79ba420","analyzedAt":"2026-08-15T13:12:30.133Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}