hasura/graphql-engine · error
config %v is not supported
Error message
config %v is not supported
What it means
NewProjectMigrate refuses to construct a ProjectMigrate for projects whose config version is <= cli.V1. Migration commands in the modern CLI only work with config version 2/3 projects; this guard exists so legacy v1 projects fail fast with a clear message instead of behaving incorrectly. The tests reference SkipExecution for both config v2 and v3, confirming those are the supported versions.
Source
Thrown at cli/pkg/migrate/project_migrate.go:111
ec.Stdout = io.Discard
err := ec.Prepare()
if err != nil {
return nil, errors.E(op, err)
}
p.ec = ec
for _, opt := range opts {
opt(p)
}
err = ec.Validate()
if err != nil {
return nil, errors.E(op, err)
}
if ec.Config.Version <= cli.V1 {
return nil, errors.E(op, fmt.Errorf("config %v is not supported", ec.Config.Version))
}
return p, nil
}
type ProjectMigrateOption func(*ProjectMigrate)
func WithEndpoint(endpoint string) ProjectMigrateOption {
return func(m *ProjectMigrate) {
m.ec.Viper.Set("endpoint", endpoint)
}
}
func WithAdminSecret(adminSecret string) ProjectMigrateOption {
return func(m *ProjectMigrate) {
m.ec.Viper.Set("admin_secret", adminSecret)
}
}View on GitHub (pinned to 724551b9ae)
Solutions
- Bump config.yaml to `version: 2` or `version: 3` following the v2 config format changes
- Migrate the project properly: create a new project with the new CLI and copy migrations/metadata directories across
- Alternatively install the hasura-cli v1 binary to keep working with the legacy project
- Verify you're running commands from the directory containing the updated config.yaml
Example fix
# before (config.yaml) version: 1 # after version: 2
Defensive patterns
Strategy: validation
Validate before calling
cfg, _ := util.ParseConfig("config.yaml")
if cfg.Version <= 1 {
return fmt.Errorf("upgrade config.yaml to version 2 or 3 before running migrate commands")
} Prevention
- Upgrade config.yaml when moving a project to the v2 CLI
- Assert config version in CI before migrate apply
- Keep the legacy v1 binary installed if you must maintain old projects
When it happens
Trigger: Calling NewProjectMigrate (any migrate command: apply, create, status, squash) when config.yaml contains `version: 1` or an unset/zero version. The same guard pattern as the metadata package, applied to the migrate subsystem.
Common situations: Running `hasura migrate apply` in a v1-era project with a v2+ CLI; upgrading the CLI but not the project config; CI pipelines pinned to old config files; collaborators on old branches hitting this after pulling new tooling.
Related errors
- config %v is not supported
- error in writing config: %w
- migrations on database '%s' of kind '%s' is not supported
- version %v not found
- unable to remove versions from database: %w
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/1c035e1ae5e08e2c.
Report an issue: GitHub.