{"record":{"id":"92b170e6a6ac7711","repo":"hasura/graphql-engine","slug":"skipping-applying-migrations-on-database-s-enc-92b170","errorCode":null,"errorMessage":"skipping applying migrations on database '%s', encountered: \n%w","messagePattern":"skipping applying migrations on database '(.+?)', encountered: \n%w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/commands/migrate_apply.go","lineNumber":325,"sourceCode":"\t\t\t\treturn \"nothing to apply on database: \" + o.Source.Name, nil\n\t\t\t}\n\t\tcase errors.As(err, &errNotFound):\n\t\t\t// check if the returned error is a directory not found error\n\t\t\t// ie might be because  a migrations/<source_name> directory is not found\n\t\t\t// if so skip this\n\t\t\treturn \"\", herrors.E(\n\t\t\t\top,\n\t\t\t\tfmt.Errorf(\n\t\t\t\t\t\"skipping applying migrations on database '%s', encountered: \\n%s\",\n\t\t\t\t\to.Source.Name,\n\t\t\t\t\terrNotFound.Error(),\n\t\t\t\t),\n\t\t\t)\n\t\t}\n\n\t\treturn \"\", herrors.E(\n\t\t\top,\n\t\t\tfmt.Errorf(\n\t\t\t\t\"skipping applying migrations on database '%s', encountered: \\n%w\",\n\t\t\t\to.Source.Name,\n\t\t\t\terr,\n\t\t\t),\n\t\t)\n\t}\n\n\tif len(o.Source.Name) == 0 && !o.EC.AllDatabases {\n\t\to.Source = o.EC.Source\n\t}\n\n\terr := o.Validate()\n\tif err != nil {\n\t\treturn nil, herrors.E(op, err)\n\t}\n\n\tif o.EC.AllDatabases && o.EC.Config.Version >= cli.V3 {\n\t\to.EC.Spin(\"getting lists of databases from server \")","sourceCodeStart":307,"sourceCodeEnd":343,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/commands/migrate_apply.go#L307-L343","documentation":"Generic sibling of error 108: reading the migrations directory for a source failed with an error that is NOT a directory-not-found error (permission denied, IO error, etc.), and the database is skipped with the underlying error wrapped via %w.","triggerScenarios":"`hasura migrate apply` where reading migrations/<source_name> fails due to filesystem permissions, a file where a directory is expected, or corrupted files.","commonSituations":"Read-only mount in CI, ownership mismatch after copying a project, or a file named like the migrations directory.","solutions":["Check permissions on the migrations/<source_name> directory (ls -la migrations/)","Ensure it is a directory, not a file; recreate if corrupted","Run from a writable checkout; fix volume mounts in containers"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"for d in migrations/*/; do test -r \"$d\" || echo \"unreadable: $d\"; done","typeGuard":null,"tryCatchPattern":"if strings.Contains(err.Error(), \"skipping applying migrations\") { log.Warnf(\"skipped %s: %v\", db, err) }","preventionTips":["Ensure the checkout holding migrations/ is writable and owned by the CI user"],"tags":["migrate-apply","filesystem","skip"],"backgroundTag":"migration-directory-read-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}