{"record":{"id":"0276c4c547641c87","repo":"gastownhall/beads","slug":"storage-backend-q-is-no-longer-supported-s","errorCode":null,"errorMessage":"storage backend %q is no longer supported: %s","messagePattern":"storage backend %q is no longer supported: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"internal/configfile/backend_messages.go","lineNumber":44,"sourceCode":"// removedBackendRationale picks the rationale clause for a removed backend.\nfunc removedBackendRationale(backend string) string {\n\tif backend == BackendSQLite {\n\t\treturn RemovedSQLiteRationale\n\t}\n\treturn RemovedBackendRationale\n}\n\n// RemovedBackendDetail returns the shared body of every removed-backend error:\n// the rationale, the untouched-data guarantee, and the migration path. Callers\n// prepend a site-specific lead-in; RemovedBackendError carries the standard one.\nfunc RemovedBackendDetail(backend string) string {\n\treturn fmt.Sprintf(\"%s; the configured %s database was not opened or modified; export it with a bd version that supports %s, then follow bd help init-safety to reinitialize with Dolt and import the exported data\", removedBackendRationale(backend), backend, backend)\n}\n\n// RemovedBackendError is the standard fail-closed error for metadata that\n// selects a backend whose direct support was removed.\nfunc RemovedBackendError(backend string) error {\n\treturn fmt.Errorf(\"storage backend %q is no longer supported: %s\", backend, RemovedBackendDetail(backend))\n}\n\n// UnknownBackendError is the standard fail-closed error for metadata that\n// names a backend this build does not recognize.\nfunc UnknownBackendError(backend string) error {\n\treturn fmt.Errorf(\"storage backend %q in metadata.json is not recognized or supported; %s; the supported backend is %q; fix or restore metadata.json and retry\", backend, BackendNotOpenedGuarantee, BackendDolt)\n}\n","sourceCodeStart":26,"sourceCodeEnd":52,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/configfile/backend_messages.go#L26-L52","documentation":"RemovedBackendError is bd's fail-closed error when metadata.json selects a storage backend whose direct support was removed (e.g. sqlite). It guarantees the configured database was NOT opened or modified, and instructs exporting with an older bd version before reinitializing with Dolt.","triggerScenarios":"Running any bd command in a workspace whose .beads/metadata.json names a removed backend; RemovedBackendError is returned during backend resolution at startup.","commonSituations":"Upgrading bd after a backend was deprecated/removed; cloning a repo created with an old bd version that used sqlite.","solutions":["Install a bd version that still supports the backend and run `bd export` to dump the issues","Follow the `bd help init-safety` runbook to reinitialize the workspace with Dolt","Import the exported data into the fresh Dolt-backed database","Update metadata.json only via the supported reinit flow, never by hand-editing"],"exampleFix":"// before (metadata.json)\n{\"backend\":\"sqlite\"}\n// after\nbd export -f issues.jsonl && bd init  # then bd import issues.jsonl with Dolt backend","handlingStrategy":"try-catch","validationCode":"meta, _ := os.ReadFile(filepath.Join(\".beads\", \"metadata.json\"))\nvar m struct{ Backend string `json:\"backend\"` }\nif json.Unmarshal(meta, &m) == nil && m.Backend != \"\" && m.Backend != \"dolt\" {\n    // stop: unsupported backend — use an older bd to export first\n}","typeGuard":"func isRemovedBackend(b string) bool {\n    switch b { case \"sqlite\", \"sqlite3\": return true; default: return false }\n}","tryCatchPattern":"if err := bd.Run(...); err != nil {\n    var rbe *bd.RemovedBackendError\n    if errors.As(err, &rbe) {\n        fmt.Fprintln(os.Stderr, \"backend removed: export with older bd, then reinit per bd help init-safety\")\n        os.Exit(1)\n    }\n    return err\n}","preventionTips":["Keep metadata.json managed by bd — never hand-edit","Before upgrading bd, read release notes for removed backends","Keep a bd version that can export installed until migration completes","Commit metadata.json so it can be restored from git"],"tags":["storage","backend","migration"],"backgroundTag":"unsupported-storage-backend","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}