{"record":{"id":"f3479624c09cd581","repo":"hasura/graphql-engine","slug":"not-a-valid-input-for-steps-version-w","errorCode":null,"errorMessage":"not a valid input for steps/version: %w","messagePattern":"not a valid input for steps/version: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/commands/migrate_apply.go","lineNumber":517,"sourceCode":"\t\t)\n\t}\n\n\tskipExecutionValid := migrationName == \"version\" || migrationName == \"up\" ||\n\t\tmigrationName == \"down\"\n\tif !skipExecutionValid && skipExecution {\n\t\treturn \"\", 0, herrors.E(\n\t\t\top,\n\t\t\t\"--skip-execution flag can be set only with --version, --up, --down flags\",\n\t\t)\n\t}\n\n\tif stepString == \"all\" && migrationName != \"version\" {\n\t\treturn migrationName, -1, nil\n\t}\n\n\tstep, err := strconv.ParseInt(stepString, 10, 64)\n\tif err != nil {\n\t\treturn \"\", 0, herrors.E(op, fmt.Errorf(\"not a valid input for steps/version: %w\", err))\n\t}\n\n\treturn migrationName, step, nil\n}\n","sourceCodeStart":499,"sourceCodeEnd":522,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/commands/migrate_apply.go#L499-L522","documentation":"The --version-type/--goto-version parsing accepts 'all' or an integer for steps/version. Any non-integer, non-'all' value passed to strconv.ParseInt triggers this wrap of the strconv error.","triggerScenarios":"`hasura migrate apply --goto-version abc` or --version 1.5, or setting steps via ENV/config with a non-numeric value while not using the literal 'all'.","commonSituations":"Typo like 'ALL' (case-sensitive) or 'all-databases' mistakenly used as goto-version; shell variable expansion producing an empty/non-numeric string.","solutions":["Use an integer or the exact lowercase string 'all'","Quote and echo the variable feeding --goto-version in scripts to verify its value","For version-type version, pass the numeric timestamp from `hasura migrate status`"],"exampleFix":"# before\nhasura migrate apply --goto-version \"$VER\"   # VER accidentally 'all '\n# after\nhasura migrate apply --goto-version \"$(echo \"$VER\" | tr -d ' ')\"  # or fix VER to 'all' or a number","handlingStrategy":"validation","validationCode":"case \"$V\" in all|[0-9]*) ;; *) echo \"invalid steps/version: $V\"; exit 1;; esac","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Normalize/trim variables feeding --goto-version","Remember 'all' is lowercase-only"],"tags":["migrate-apply","parse-error","cli-usage"],"backgroundTag":"invalid-numeric-input","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}