{"record":{"id":"02a8f0fe73d48782","repo":"hasura/graphql-engine","slug":"moving-s-to-s-w","errorCode":null,"errorMessage":"moving %s to %s : %w","messagePattern":"moving (.+?) to (.+?) : %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/internal/scripts/update-project-v3.go","lineNumber":287,"sourceCode":"\t}\n\n\treturn nil\n}\n\nfunc copyMigrations(fs afero.Fs, dirs []string, parentDir, target string) error {\n\tvar op errors.Op = \"scripts.copyMigrations\"\n\n\tfor _, dir := range dirs {\n\t\tf, _ := fs.Stat(filepath.Join(parentDir, dir))\n\t\tif f != nil {\n\t\t\tif f.IsDir() {\n\t\t\t\terr := util.CopyDirAfero(\n\t\t\t\t\tfs,\n\t\t\t\t\tfilepath.Join(parentDir, dir),\n\t\t\t\t\tfilepath.Join(target, dir),\n\t\t\t\t)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn errors.E(op, fmt.Errorf(\"moving %s to %s : %w\", dir, target, err))\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\terr := util.CopyFileAfero(\n\t\t\t\t\tfs,\n\t\t\t\t\tfilepath.Join(parentDir, dir),\n\t\t\t\t\tfilepath.Join(target, dir),\n\t\t\t\t)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn errors.E(op, fmt.Errorf(\"moving %s to %s : %w\", dir, target, err))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc copyFiles(fs afero.Fs, files []string, parentDir, target string) error {","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/internal/scripts/update-project-v3.go#L269-L305","documentation":"Inside copyMigrations: copying a migration subdirectory with util.CopyDirAfero from the old parent directory to the new target directory failed. The message names the directory and target. Wrap of the underlying copy error.","triggerScenarios":"Copying a named migration directory (e.g. a non-numeric directory) fails due to unreadable/locked files inside it or an unwritable target path.","commonSituations":"Locked files on Windows, permission-restricted migration subdirectories, target disk full, or symlinked/odd directories the copier cannot traverse.","solutions":["Check the named directory for permission or lock issues and fix them","Verify the target path is writable and has space","Copy the directory manually and re-run, or restore from VCS and retry"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if fi, err := os.Stat(filepath.Join(parentDir, dir)); err != nil || !fi.IsDir() {\n    return fmt.Errorf(\"migration dir %s unreadable\", dir)\n}","typeGuard":null,"tryCatchPattern":"if err := copyMigrations(fs, dirs, parent, target); err != nil {\n    // err names dir+target; verify readability, fix, retry that dir\n}","preventionTips":["Keep migration directories free of locks/symlinks","Ensure target has space and write permission"],"tags":["filesystem","copy","migrations","hasura-cli"],"backgroundTag":"file-copy-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}