{"record":{"id":"51f578c7a262e22b","repo":"juanfont/headscale","slug":"version-downgrade-not-supported","errorCode":null,"errorMessage":"version downgrade not supported","messagePattern":"version downgrade not supported","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"hscontrol/db/versioncheck.go","lineNumber":19,"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\n}\n","sourceCodeStart":1,"sourceCodeEnd":37,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/hscontrol/db/versioncheck.go#L1-L37","documentation":"Error \"version downgrade not supported\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at hscontrol/db/versioncheck.go:19 when the library encounters an invalid state.","commonSituations":"Downgrading headscale against a database written by a newer minor version is not supported. Restore a backup taken before the upgrade, or run the newer version.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (version downgrade 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 downgrade 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-15T22:17:37.221Z"}